Skip to content

Commit 98f78b9

Browse files
committed
Add variables for build tools versions
1 parent 25ada86 commit 98f78b9

File tree

4 files changed

+22
-12
lines changed

4 files changed

+22
-12
lines changed

AndroidTestingBlueprint/app/build.gradle

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
apply plugin: 'com.android.application'
22

33
android {
4-
compileSdkVersion 22
5-
buildToolsVersion '23.0.0rc3'
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 22
1819
versionCode 1
1920
versionName '1.0'
2021

AndroidTestingBlueprint/build.gradle

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,10 @@ allprojects {
1717
jcenter()
1818
}
1919
}
20+
21+
ext {
22+
minSdkVersion = 10
23+
targetSdkVersion = 22
24+
compileSdkVersion = 23
25+
buildToolsVersion = "23.0.0"
26+
}

AndroidTestingBlueprint/module-android-library/build.gradle

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
apply plugin: 'com.android.library'
22

33
android {
4-
compileSdkVersion 22
5-
buildToolsVersion "23.0.0rc3"
4+
compileSdkVersion rootProject.ext.compileSdkVersion
5+
buildToolsVersion rootProject.ext.buildToolsVersion
66

77
defaultConfig {
8-
minSdkVersion 10
9-
targetSdkVersion 22
8+
minSdkVersion rootProject.ext.minSdkVersion
9+
targetSdkVersion rootProject.ext.targetSdkVersion
10+
1011
versionCode 1
1112
versionName "1.0"
1213

AndroidTestingBlueprint/module-flavor1-androidTest-only/build.gradle

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
apply plugin: 'com.android.test' // A plugin used for test-only-modules
22

33
android {
4-
compileSdkVersion 22
5-
buildToolsVersion = '23.0.0rc3'
4+
compileSdkVersion rootProject.ext.compileSdkVersion
5+
buildToolsVersion rootProject.ext.buildToolsVersion
66

77
defaultConfig {
8-
minSdkVersion 10
9-
targetSdkVersion 22
8+
minSdkVersion rootProject.ext.minSdkVersion
9+
targetSdkVersion rootProject.ext.targetSdkVersion
10+
1011
// The package name of the test app
1112
testApplicationId 'com.example.android.testing.blueprint.test'
1213
// The Instrumentation test runner used to run tests.

0 commit comments

Comments
 (0)