Skip to content

Commit 6c70318

Browse files
domdomeggveyndan
authored andcommitted
Use gradle constants and update GSON
1 parent cd5d212 commit 6c70318

File tree

3 files changed

+21
-14
lines changed

3 files changed

+21
-14
lines changed

app/build.gradle

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,26 +12,24 @@ dependencies {
1212
compile 'ch.acra:acra:4.7.0'
1313
compile 'org.mediawiki:api:1.3'
1414
compile 'commons-codec:commons-codec:1.10'
15-
compile 'com.android.support:support-v4:25.2.0'
16-
compile 'com.android.support:appcompat-v7:25.2.0'
17-
compile 'com.android.support:design:25.2.0'
15+
compile "com.android.support:support-v4:${project.supportLibVersion}"
16+
compile "com.android.support:appcompat-v7:${project.supportLibVersion}"
17+
compile "com.android.support:design:${project.supportLibVersion}"
18+
compile 'com.google.code.gson:gson:2.7'
1819

1920
testCompile 'junit:junit:4.12'
20-
21-
//noinspection GradleDependency - old version has required feature
22-
compile 'com.google.code.gson:gson:1.4'
2321
}
2422

2523
android {
26-
compileSdkVersion 25
27-
buildToolsVersion '25.0.1'
24+
compileSdkVersion project.compileSdkVersion
25+
buildToolsVersion project.buildToolsVersion
2826

29-
useLibrary 'org.apache.http.legacy'
27+
useLibrary 'org.apache.http.legacy'
3028

3129
defaultConfig {
32-
applicationId "fr.free.nrw.commons"
33-
minSdkVersion 15
34-
targetSdkVersion 25
30+
applicationId 'fr.free.nrw.commons'
31+
minSdkVersion project.minSdkVersion
32+
targetSdkVersion project.targetSdkVersion
3533
}
3634

3735
buildTypes {
@@ -46,4 +44,4 @@ android {
4644
disable 'ExtraTranslation'
4745
abortOnError false
4846
}
49-
}
47+
}

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ buildscript {
55
mavenCentral()
66
}
77
dependencies {
8-
classpath 'com.android.tools.build:gradle:2.3.0'
8+
classpath "com.android.tools.build:gradle:${project.gradleVersion}"
99
}
1010
}
1111

gradle.properties

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
gradleVersion = 2.3.0
2+
3+
supportLibVersion = 25.2.0
4+
5+
compileSdkVersion = android-25
6+
buildToolsVersion = 25.0.1
7+
8+
minSdkVersion = 15
9+
targetSdkVersion = 25

0 commit comments

Comments
 (0)