@@ -2,14 +2,6 @@ apply plugin: 'com.android.application'
2
2
3
3
android {
4
4
compileSdkVersion rootProject. ext. compileSdkVersion
5
- buildToolsVersion rootProject. ext. buildToolsVersion
6
-
7
- /*
8
- Test only modules require other artifacts like the classes.jar to be published, so the test can
9
- reference the tested java sources and compile them correctly. In order to get all these
10
- artifacts published from the tested module publishNonDefault needs to be set to true.
11
- */
12
- publishNonDefault true
13
5
14
6
defaultConfig {
15
7
minSdkVersion rootProject. ext. minSdkVersion
@@ -54,6 +46,8 @@ android {
54
46
}
55
47
}
56
48
49
+ flavorDimensions " defaultDimension"
50
+
57
51
productFlavors {
58
52
flavor1 {
59
53
applicationId ' com.example.android.testing.blueprint.flavor1'
@@ -74,34 +68,34 @@ android {
74
68
75
69
dependencies {
76
70
// App's dependencies, including test
77
- compile ' com.android.support:appcompat-v7:' + rootProject. ext. supportLibVersion
71
+ implementation ' com.android.support:appcompat-v7:' + rootProject. ext. supportLibVersion
78
72
79
- compile project(' :module-plain-java' ) // Optional module for non-Android code
80
- compile project(' :module-android-library' ) // Optional module for additional Android code
73
+ implementation project(' :module-plain-java' ) // Optional module for non-Android code
74
+ implementation project(' :module-android-library' ) // Optional module for additional Android code
81
75
82
76
// Dependencies for local unit tests
83
- testCompile ' junit:junit:' + rootProject. ext. junitVersion
84
- testCompile ' org.mockito:mockito-all:' + rootProject. ext. mockitoVersion
85
- testCompile ' org.hamcrest:hamcrest-all:' + rootProject. ext. hamcrestVersion
77
+ testImplementation ' junit:junit:' + rootProject. ext. junitVersion
78
+ testImplementation ' org.mockito:mockito-all:' + rootProject. ext. mockitoVersion
79
+ testImplementation ' org.hamcrest:hamcrest-all:' + rootProject. ext. hamcrestVersion
86
80
87
81
// Android Testing Support Library's runner and rules
88
- androidTestCompile ' com.android.support.test:runner:' + rootProject. ext. runnerVersion
89
- androidTestCompile ' com.android.support.test:rules:' + rootProject. ext. rulesVersion
82
+ androidTestImplementation ' com.android.support.test:runner:' + rootProject. ext. runnerVersion
83
+ androidTestImplementation ' com.android.support.test:rules:' + rootProject. ext. rulesVersion
90
84
91
85
// Espresso UI Testing
92
- androidTestCompile ' com.android.support.test.espresso:espresso-core:' + rootProject. ext. espressoVersion
86
+ androidTestImplementation ' com.android.support.test.espresso:espresso-core:' + rootProject. ext. espressoVersion
93
87
94
88
// Espresso-Contrib, Intents and Web dependencies are not used in this project.
95
89
/*
96
- androidTestCompile 'com.android.support.test.espresso:espresso-contrib:' + rootProject.ext.espressoVersion
97
- androidTestCompile 'com.android.support.test.espresso:espresso-intents:' + rootProject.ext.espressoVersion
98
- androidTestCompile 'com.android.support.test.espresso:espresso-web:' + rootProject.ext.espressoVersion
90
+ androidTestImplementation 'com.android.support.test.espresso:espresso-contrib:' + rootProject.ext.espressoVersion
91
+ androidTestImplementation 'com.android.support.test.espresso:espresso-intents:' + rootProject.ext.espressoVersion
92
+ androidTestImplementation 'com.android.support.test.espresso:espresso-web:' + rootProject.ext.espressoVersion
99
93
*/
100
94
101
95
// UIAutomator Testing. Learn about this dependency in this projects README file.
102
- androidTestCompile ' com.android.support.test.uiautomator:uiautomator-v18:' + rootProject. ext. uiautomatorVersion
96
+ androidTestImplementation ' com.android.support.test.uiautomator:uiautomator-v18:' + rootProject. ext. uiautomatorVersion
103
97
104
98
// Resolve conflicts between main and test APK:
105
- androidTestCompile " com.android.support:support-annotations:$rootProject . supportLibVersion "
99
+ androidTestImplementation " com.android.support:support-annotations:$rootProject . supportLibVersion "
106
100
107
101
}
0 commit comments