Skip to content

Commit f3bfe4b

Browse files
committed
AndroidX refactoring
1 parent 3da114c commit f3bfe4b

File tree

4 files changed

+13
-29
lines changed

4 files changed

+13
-29
lines changed

app/build.gradle

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ android {
66
compileSdkVersion 28
77

88
defaultConfig {
9-
applicationId "boxresin.test.android_thread_switcher"
9+
applicationId 'boxresin.test.android_thread_switcher'
1010
minSdkVersion 14
1111
targetSdkVersion 28
1212
versionCode 1
13-
versionName "1.0.0"
14-
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
13+
versionName '1.0.0'
14+
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
1515
}
1616

1717
buildTypes {
@@ -31,14 +31,13 @@ dependencies {
3131
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
3232

3333
// AndroidX
34-
implementation 'com.android.support:appcompat-v7:28.0.0-rc02'
35-
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
34+
implementation 'androidx.appcompat:appcompat:1.0.0-rc02'
35+
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
3636

3737
// Test
3838
testImplementation 'junit:junit:4.12'
3939

4040
// Android Test
41-
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
42-
exclude group: 'com.android.support', module: 'support-annotations'
43-
})
41+
androidTestImplementation 'androidx.test:runner:1.1.0-alpha4'
42+
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0-alpha4'
4443
}

app/src/main/java/boxresin/test/android_thread_switcher/MainActivity.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package boxresin.test.android_thread_switcher
22

33
import android.os.Bundle
4-
import android.support.v7.app.AppCompatActivity
54
import android.widget.Toast
5+
import androidx.appcompat.app.AppCompatActivity
66
import boxresin.library.android_thread_switcher.ThreadSwitcher
77
import kotlinx.android.synthetic.main.activity_main.*
88

gradle.properties

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,3 @@
1-
# Project-wide Gradle settings.
2-
3-
# IDE (e.g. Android Studio) users:
4-
# Gradle settings configured through the IDE *will override*
5-
# any settings specified in this file.
6-
7-
# For more details on how to configure your build environment visit
8-
# http://www.gradle.org/docs/current/userguide/build_environment.html
9-
10-
# Specifies the JVM arguments used for the daemon process.
11-
# The setting is particularly useful for tweaking memory settings.
121
org.gradle.jvmargs=-Xmx1536m
13-
14-
# When configured, Gradle will run in incubating parallel mode.
15-
# This option should only be used with decoupled projects. More details, visit
16-
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
17-
# org.gradle.parallel=true
2+
android.useAndroidX=true
3+
android.enableJetifier=true

lib/build.gradle

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ android {
2222
defaultConfig {
2323
minSdkVersion 14
2424
targetSdkVersion 28
25-
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
25+
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
2626
}
2727

2828
buildTypes {
@@ -44,7 +44,6 @@ dependencies {
4444
testImplementation 'junit:junit:4.12'
4545

4646
// Android Test
47-
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
48-
exclude group: 'com.android.support', module: 'support-annotations'
49-
})
47+
androidTestImplementation 'androidx.test:runner:1.1.0-alpha4'
48+
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0-alpha4'
5049
}

0 commit comments

Comments
 (0)