@@ -2,14 +2,6 @@ apply plugin: 'com.android.application'
22
33android {
44 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
135
146 defaultConfig {
157 minSdkVersion rootProject. ext. minSdkVersion
@@ -54,6 +46,8 @@ android {
5446 }
5547 }
5648
49+ flavorDimensions " defaultDimension"
50+
5751 productFlavors {
5852 flavor1 {
5953 applicationId ' com.example.android.testing.blueprint.flavor1'
@@ -74,34 +68,34 @@ android {
7468
7569dependencies {
7670 // 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
7872
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
8175
8276 // 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
8680
8781 // 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
9084
9185 // 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
9387
9488 // Espresso-Contrib, Intents and Web dependencies are not used in this project.
9589 /*
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
9993 */
10094
10195 // 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
10397
10498 // 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 "
106100
107101}
0 commit comments