11apply plugin : ' com.android.application'
22
33android {
4- compileSdkVersion 23
5- buildToolsVersion ' 23.0.1 '
4+ compileSdkVersion rootProject . ext . compileSdkVersion
5+ buildToolsVersion rootProject . ext . buildToolsVersion
66
77 /*
88 Test only modules require other artifacts like the classes.jar to be published, so the test can
@@ -12,9 +12,10 @@ android {
1212 publishNonDefault true
1313
1414 defaultConfig {
15+ minSdkVersion rootProject. ext. minSdkVersion
16+ targetSdkVersion rootProject. ext. targetSdkVersion
17+
1518 applicationId ' com.example.android.testing.blueprint'
16- minSdkVersion 10
17- targetSdkVersion 23
1819 versionCode 1
1920 versionName ' 1.0'
2021
@@ -67,30 +68,30 @@ android {
6768
6869dependencies {
6970 // App's dependencies, including test
70- compile ' com.android.support:appcompat-v7:23.0.1 '
71+ compile ' com.android.support:appcompat-v7:' + rootProject . ext . supportLibVersion
7172
7273 compile project(' :module-plain-java' ) // Optional module for non-Android code
7374 compile project(' :module-android-library' ) // Optional module for additional Android code
7475
7576 // Dependencies for local unit tests
76- testCompile ' junit:junit:4.12 '
77- testCompile ' org.mockito:mockito-all:1.10.19 '
78- testCompile ' org.hamcrest:hamcrest-all:1.3 '
77+ testCompile ' junit:junit:' + rootProject . ext . junitVersion
78+ testCompile ' org.mockito:mockito-all:' + rootProject . ext . mockitoVersion
79+ testCompile ' org.hamcrest:hamcrest-all:' + rootProject . ext . hamcrestVersion
7980
8081 // Android Testing Support Library's runner and rules
81- androidTestCompile ' com.android.support.test:runner:0.4 '
82- androidTestCompile ' com.android.support.test:rules:0.4 '
82+ androidTestCompile ' com.android.support.test:runner:' + rootProject . ext . runnerVersion
83+ androidTestCompile ' com.android.support.test:rules:' + rootProject . ext . rulesVersion
8384
8485 // Espresso UI Testing
85- androidTestCompile ' com.android.support.test.espresso:espresso-core:2.2.1 '
86+ androidTestCompile ' com.android.support.test.espresso:espresso-core:' + rootProject . ext . espressoVersion
8687
8788 // Espresso-Contrib, Intents and Web dependencies are not used in this project.
8889 /*
89- androidTestCompile 'com.android.support.test.espresso:espresso-contrib:2.2.1'
90- androidTestCompile 'com.android.support.test.espresso:espresso-intents:2.2.1'
91- androidTestCompile 'com.android.support.test.espresso:espresso-web:2.2.1'
90+ androidTestCompile 'com.android.support.test.espresso:espresso-contrib:' + rootProject.ext.espressoVersion
91+ androidTestCompile 'com.android.support.test.espresso:espresso-intents:' + rootProject.ext.espressoVersion
92+ androidTestCompile 'com.android.support.test.espresso:espresso-web:' + rootProject.ext.espressoVersion
9293 */
9394
9495 // UIAutomator Testing. Learn about this dependency in this projects README file.
95- androidTestCompile ' com.android.support.test.uiautomator:uiautomator-v18:2.1.2 '
96+ androidTestCompile ' com.android.support.test.uiautomator:uiautomator-v18:' + rootProject . ext . uiautomatorVersion
9697}
0 commit comments