1
1
apply plugin : ' com.android.application'
2
2
3
3
android {
4
- compileSdkVersion 23
5
- buildToolsVersion ' 23.0.1 '
4
+ compileSdkVersion rootProject . ext . compileSdkVersion
5
+ buildToolsVersion rootProject . ext . buildToolsVersion
6
6
7
7
/*
8
8
Test only modules require other artifacts like the classes.jar to be published, so the test can
@@ -12,9 +12,10 @@ android {
12
12
publishNonDefault true
13
13
14
14
defaultConfig {
15
+ minSdkVersion rootProject. ext. minSdkVersion
16
+ targetSdkVersion rootProject. ext. targetSdkVersion
17
+
15
18
applicationId ' com.example.android.testing.blueprint'
16
- minSdkVersion 10
17
- targetSdkVersion 23
18
19
versionCode 1
19
20
versionName ' 1.0'
20
21
@@ -67,30 +68,30 @@ android {
67
68
68
69
dependencies {
69
70
// 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
71
72
72
73
compile project(' :module-plain-java' ) // Optional module for non-Android code
73
74
compile project(' :module-android-library' ) // Optional module for additional Android code
74
75
75
76
// 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
79
80
80
81
// 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
83
84
84
85
// 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
86
87
87
88
// Espresso-Contrib, Intents and Web dependencies are not used in this project.
88
89
/*
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
92
93
*/
93
94
94
95
// 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
96
97
}
0 commit comments