@@ -20,13 +20,13 @@ apply plugin: 'kotlin-kapt'
20
20
apply plugin : ' kotlin-android-extensions'
21
21
22
22
android {
23
- compileSdkVersion rootProject . ext . compileSdkVersion
24
- buildToolsVersion rootProject . ext . buildToolsVersion
23
+ compileSdkVersion build_versions . target_sdk
24
+ buildToolsVersion build_versions . build_tools
25
25
26
26
defaultConfig {
27
27
applicationId " com.example.android.observability"
28
- minSdkVersion rootProject . ext . minSdkVersion
29
- targetSdkVersion rootProject . ext . targetSdkVersion
28
+ minSdkVersion build_versions . min_sdk
29
+ targetSdkVersion build_versions . targetSdkVersion
30
30
versionCode 1
31
31
versionName " 1.0"
32
32
testInstrumentationRunner " android.support.test.runner.AndroidJUnitRunner"
@@ -41,58 +41,53 @@ android {
41
41
42
42
dependencies {
43
43
// Support libraries
44
- implementation " com.android.support:appcompat-v7:$rootProject . supportLibraryVersion "
45
- implementation " com.android.support:support-v4:$rootProject . supportLibraryVersion "
46
- implementation " com.android.support:design:$rootProject . supportLibraryVersion "
44
+ implementation deps. support. app_compat
45
+ implementation deps. support. v4
46
+ implementation deps. support. design
47
+
47
48
// Architecture components
48
- implementation " android.arch. lifecycle:runtime: $r ootProject . architectureComponentsVersion "
49
- implementation " android.arch. lifecycle:extensions: $r ootProject . architectureComponentsVersion "
50
- kapt " android.arch. lifecycle:compiler: $r ootProject . architectureComponentsVersion "
51
- implementation " android.arch.persistence. room:runtime: $r ootProject . architectureComponentsVersion "
52
- kapt " android.arch.persistence. room:compiler: $r ootProject . architectureComponentsVersion "
53
- implementation " android.arch.persistence. room:rxjava2: $r ootProject . architectureComponentsVersion "
49
+ implementation deps . lifecycle. runtime
50
+ implementation deps . lifecycle. extensions
51
+ kapt deps . lifecycle. compiler
52
+ implementation deps . room. runtime
53
+ kapt deps . room. compiler
54
+ implementation deps . room. rxjava2
54
55
55
56
// RxJava
56
- implementation " io.reactivex.rxjava2:rxandroid:$rootProject . rxandroidVersion "
57
- implementation " io.reactivex.rxjava2:rxjava:$rootProject . rxjavaVersion "
57
+ implementation deps. rx_android
58
+ implementation deps. rxjava2
59
+
60
+ // kotlin
61
+ // Kotlin
62
+ implementation deps. kotlin. stdlib
58
63
59
64
// Dependencies for local unit tests
60
- testImplementation " junit:junit: $r ootProject . ext . junitVersion "
61
- testImplementation " org .mockito:mockito-all: $r ootProject . ext . mockitoVersion "
62
- testImplementation " org .hamcrest:hamcrest-all: $r ootProject . ext . hamcrestVersion "
63
- testImplementation " android.arch.core:core- testing: $r ootProject . architectureComponentsVersion "
64
- testImplementation " org.jetbrains. kotlin:kotlin- stdlib: $k otlin_version "
65
- testImplementation " org.jetbrains. kotlin:kotlin- test-junit: $k otlin_version "
65
+ testImplementation deps . junit
66
+ testImplementation deps . mockito. all
67
+ testImplementation deps . hamcrest
68
+ testImplementation deps . arch_core . testing
69
+ testImplementation deps . kotlin. stdlib
70
+ testImplementation deps . kotlin. test
66
71
67
72
// Android Testing Support Library's runner and rules
68
- androidTestImplementation " com.android.support.test: runner: $r ootProject . ext . runnerVersion "
69
- androidTestImplementation " com.android.support.test: rules: $r ootProject . ext . runnerVersion "
70
- androidTestImplementation " android.arch.persistence. room:testing: $r ootProject . architectureComponentsVersion "
71
- androidTestImplementation " android.arch.core:core- testing: $r ootProject . architectureComponentsVersion "
73
+ androidTestCompile deps . atsl . runner
74
+ androidTestCompile deps . atsl . rules
75
+ androidTestCompile deps . room. testing
76
+ androidTestCompile deps . arch_core . testing
72
77
73
78
// Dependencies for Android unit tests
74
- androidTestImplementation " junit:junit:$rootProject . ext . junitVersion "
75
- androidTestImplementation " org.mockito:mockito-core:$rootProject . ext . mockitoVersion "
76
- androidTestImplementation ' com.google.dexmaker:dexmaker:1.2'
77
- androidTestImplementation ' com.google.dexmaker:dexmaker-mockito:1.2'
79
+ androidTestCompile deps. junit
80
+ androidTestCompile deps. mockito. core, { exclude group : ' net.bytebuddy' }
81
+ androidTestCompile deps. dexmaker
78
82
79
83
// Espresso UI Testing
80
- androidTestImplementation " com.android.support.test. espresso:espresso-core: $r ootProject . espressoVersion "
81
- androidTestImplementation " com.android.support.test. espresso:espresso-contrib: $r ootProject . espressoVersion "
82
- androidTestImplementation " com.android.support.test. espresso:espresso-intents: $r ootProject . espressoVersion "
84
+ androidTestCompile deps . espresso. core
85
+ androidTestCompile deps . espresso. contrib
86
+ androidTestCompile deps . espresso. intents
83
87
84
88
// Resolve conflicts between main and test APK:
85
- androidTestImplementation " com.android.support:support-annotations:$rootProject . supportLibraryVersion "
86
- androidTestImplementation " com.android.support:support-v4:$rootProject . supportLibraryVersion "
87
- androidTestImplementation " com.android.support:appcompat-v7:$rootProject . supportLibraryVersion "
88
- androidTestImplementation " com.android.support:design:$rootProject . supportLibraryVersion "
89
-
90
- // Kotlin
91
- implementation " org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version "
89
+ androidTestCompile deps. support. annotations
90
+ androidTestCompile deps. support. v4
91
+ androidTestCompile deps. support. app_compat
92
+ androidTestCompile deps. support. design
92
93
}
93
-
94
- configurations. all {
95
- resolutionStrategy {
96
- force " org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version "
97
- }
98
- }
0 commit comments