Skip to content

Commit 53e73a7

Browse files
author
Jonathan Caryl
committed
Move common build settings into project root
1 parent 4cbc0f2 commit 53e73a7

File tree

4 files changed

+23
-13
lines changed

4 files changed

+23
-13
lines changed

app/build.gradle

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
apply plugin: 'com.android.application'
22

33
android {
4-
compileSdkVersion 25
5-
buildToolsVersion "25.0.2"
4+
compileSdkVersion rootProject.ext.compileSdkVersion
5+
buildToolsVersion rootProject.ext.buildToolsVersion
6+
67
defaultConfig {
78
applicationId "es.dmoral.toastysample"
8-
minSdkVersion 14
9-
targetSdkVersion 25
9+
minSdkVersion rootProject.ext.minSdkVersion
10+
targetSdkVersion rootProject.ext.targetSdkVersion
1011
versionCode 1
1112
versionName "1.0"
1213
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
@@ -24,7 +25,7 @@ dependencies {
2425
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
2526
exclude group: 'com.android.support', module: 'support-annotations'
2627
})
27-
compile 'com.android.support:appcompat-v7:25.1.0'
28+
compile "com.android.support:appcompat-v7:$supportLibVersion"
2829
testCompile 'junit:junit:4.12'
2930
compile project(':toasty')
3031
}

build.gradle

+10-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ buildscript {
55
jcenter()
66
}
77
dependencies {
8-
classpath 'com.android.tools.build:gradle:2.2.3'
8+
classpath 'com.android.tools.build:gradle:2.3.0'
99
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
1010

1111
// NOTE: Do not place your application dependencies here; they belong
@@ -19,6 +19,15 @@ allprojects {
1919
}
2020
}
2121

22+
ext {
23+
compileSdkVersion = 25
24+
buildToolsVersion = '25.0.2'
25+
minSdkVersion = 9
26+
targetSdkVersion = compileSdkVersion
27+
28+
supportLibVersion = '25.2.0'
29+
}
30+
2231
task clean(type: Delete) {
2332
delete rootProject.buildDir
2433
}
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Mon Dec 28 10:00:20 PST 2015
1+
#Mon Mar 13 08:55:32 GMT 2017
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip

toasty/build.gradle

+5-5
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ group = 'com.github.GrenderG'
44
version = '1.1.3'
55

66
android {
7-
compileSdkVersion 25
8-
buildToolsVersion "25.0.2"
7+
compileSdkVersion rootProject.ext.compileSdkVersion
8+
buildToolsVersion rootProject.ext.buildToolsVersion
99

1010
defaultConfig {
11-
minSdkVersion 9
12-
targetSdkVersion 25
11+
minSdkVersion rootProject.ext.minSdkVersion
12+
targetSdkVersion rootProject.ext.targetSdkVersion
1313
versionCode 113
1414
versionName "1.1.3"
1515

@@ -26,5 +26,5 @@ android {
2626

2727
dependencies {
2828
compile fileTree(dir: 'libs', include: ['*.jar'])
29-
compile 'com.android.support:appcompat-v7:25.1.1'
29+
compile "com.android.support:appcompat-v7:$supportLibVersion"
3030
}

0 commit comments

Comments
 (0)