Skip to content

Commit 927c3ff

Browse files
committed
Migrated to androidX.
1 parent 0b244c5 commit 927c3ff

File tree

6 files changed

+13
-11
lines changed

6 files changed

+13
-11
lines changed

app/build.gradle

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ android {
1010
targetSdkVersion 28
1111
versionCode 1
1212
versionName "1.0"
13-
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
13+
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
1414
}
1515
buildTypes {
1616
release {
@@ -24,6 +24,6 @@ dependencies {
2424
implementation project(':library')
2525

2626
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
27-
implementation 'com.android.support:appcompat-v7:28.0.0'
28-
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
27+
implementation 'androidx.appcompat:appcompat:1.0.2'
28+
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-alpha2'
2929
}

app/src/main/java/com/tobiasschuerg/sample/MainActivity.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package com.tobiasschuerg.sample
22

33
import android.os.Bundle
4-
import android.support.v7.app.AppCompatActivity
4+
import androidx.appcompat.app.AppCompatActivity
55
import kotlinx.android.synthetic.main.activity_main.*
66

77
class MainActivity : AppCompatActivity() {

gradle.properties

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
# http://www.gradle.org/docs/current/userguide/build_environment.html
77
# Specifies the JVM arguments used for the daemon process.
88
# The setting is particularly useful for tweaking memory settings.
9+
android.enableJetifier=true
10+
android.useAndroidX=true
911
org.gradle.jvmargs=-Xmx1536m
1012
# When configured, Gradle will run in incubating parallel mode.
1113
# This option should only be used with decoupled projects. More details, visit

library/build.gradle

+4-4
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ android {
1313
versionCode 1
1414
versionName "1.0"
1515

16-
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
16+
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
1717

1818
}
1919

@@ -28,12 +28,12 @@ android {
2828

2929
dependencies {
3030
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
31-
implementation 'com.android.support:appcompat-v7:28.0.0'
31+
implementation 'androidx.appcompat:appcompat:1.0.2'
3232

3333

3434
testImplementation 'junit:junit:4.12'
3535

3636

37-
androidTestImplementation 'com.android.support.test:runner:1.0.2'
38-
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
37+
androidTestImplementation 'androidx.test:runner:1.1.0'
38+
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
3939
}

library/src/androidTest/java/com/tobiasschuerg/library/ExampleInstrumentedTest.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package com.tobiasschuerg.library;
22

33
import android.content.Context;
4-
import android.support.test.InstrumentationRegistry;
5-
import android.support.test.runner.AndroidJUnit4;
4+
import androidx.test.InstrumentationRegistry;
5+
import androidx.test.runner.AndroidJUnit4;
66

77
import org.junit.Test;
88
import org.junit.runner.RunWith;

library/src/main/java/com/tobiasschuerg/prefixsuffix/PrefixSuffixEditText.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import android.graphics.Paint
66
import android.graphics.Rect
77
import android.graphics.Typeface
88
import android.os.Build
9-
import android.support.v7.widget.AppCompatEditText
9+
import androidx.appcompat.widget.AppCompatEditText
1010
import android.text.TextPaint
1111
import android.util.AttributeSet
1212

0 commit comments

Comments
 (0)