Skip to content

Commit 1d77d48

Browse files
author
imkarl
committed
Update build tools
1 parent 0bd4b7f commit 1d77d48

File tree

5 files changed

+52
-25
lines changed

5 files changed

+52
-25
lines changed

app/build.gradle

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
apply plugin: 'com.android.application'
22
apply plugin: 'me.tatarka.retrolambda'
3+
apply from: "${project.rootProject.file('config.gradle')}"
34

45
android {
5-
compileSdkVersion 24
6-
buildToolsVersion "24.0.2"
6+
compileSdkVersion compile_sdk_version
7+
buildToolsVersion build_tools_version
78

89
defaultConfig {
910
applicationId "com.im4j.kakacache.rxjava.test"
10-
minSdkVersion 11
11-
targetSdkVersion 24
12-
versionCode 1
13-
versionName "1.0"
11+
minSdkVersion min_sdk_version
12+
targetSdkVersion target_sdk_version
13+
versionCode app_version_code
14+
versionName app_version_name
1415
}
1516
buildTypes {
1617
release {
@@ -28,7 +29,15 @@ dependencies {
2829
compile fileTree(dir: 'libs', include: ['*.jar'])
2930
compile project(':library')
3031

31-
compile 'com.android.support:appcompat-v7:24.2.0'
32-
compile 'com.squareup.retrofit2:converter-gson:2.1.0'
33-
compile 'com.squareup.retrofit2:adapter-rxjava:2.1.0'
32+
compile "com.android.support:appcompat-v7:${support_version}"
33+
34+
// rxjava
35+
compile 'io.reactivex.rxjava2:rxandroid:2.0.1'
36+
37+
// retrofit
38+
compile 'com.squareup.retrofit2:retrofit:2.2.0'
39+
compile 'com.squareup.retrofit2:converter-gson:2.2.0'
40+
compile 'com.squareup.retrofit2:adapter-rxjava2:2.2.0'
41+
42+
compile 'com.esotericsoftware:kryo:4.0.0'
3443
}

build.gradle

Lines changed: 1 addition & 1 deletion
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.1.3'
8+
classpath 'com.android.tools.build:gradle:2.3.1'
99
classpath 'me.tatarka:gradle-retrolambda:3.2.5'
1010
}
1111
}

config.gradle

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
ext {
2+
// SDK版本
3+
compile_sdk_version = 24
4+
build_tools_version = "25.0.2"
5+
// 支持的最小版本、目标版本
6+
min_sdk_version = 11
7+
target_sdk_version = 24
8+
9+
app_version_code = 1
10+
app_version_name = "1.0"
11+
12+
//support版本
13+
support_version = "25.3.1"
14+
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Sun Aug 28 19:04:30 CST 2016
1+
#Thu May 11 20:53:28 CST 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

library/build.gradle

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
apply plugin: 'com.android.library'
22
apply plugin: 'me.tatarka.retrolambda'
3+
apply from: "${project.rootProject.file('config.gradle')}"
34

45
android {
5-
compileSdkVersion 24
6-
buildToolsVersion "24.0.2"
6+
compileSdkVersion compile_sdk_version
7+
buildToolsVersion build_tools_version
78

89
defaultConfig {
9-
minSdkVersion 11
10-
targetSdkVersion 24
11-
versionCode 1
12-
versionName "1.0"
10+
minSdkVersion min_sdk_version
11+
targetSdkVersion target_sdk_version
12+
versionCode app_version_code
13+
versionName app_version_name
1314
}
1415
buildTypes {
1516
release {
@@ -26,11 +27,14 @@ android {
2627
dependencies {
2728
compile fileTree(dir: 'libs', include: ['*.jar'])
2829
testCompile 'junit:junit:4.12'
29-
compile 'com.android.support:appcompat-v7:24.2.0'
30-
compile 'com.google.code.gson:gson:2.7'
31-
compile 'io.reactivex:rxandroid:1.2.1'
32-
compile 'com.squareup.retrofit2:retrofit:2.1.0'
33-
compile 'com.squareup.retrofit2:adapter-rxjava:2.1.0'
34-
compile 'com.squareup.retrofit2:converter-gson:2.1.0'
35-
compile 'com.esotericsoftware:kryo:4.0.0'
30+
31+
// rxjava
32+
provided 'io.reactivex.rxjava2:rxandroid:2.0.1'
33+
34+
// retrofit
35+
provided 'com.squareup.retrofit2:retrofit:2.2.0'
36+
provided 'com.squareup.retrofit2:converter-gson:2.2.0'
37+
provided 'com.squareup.retrofit2:adapter-rxjava2:2.2.0'
38+
39+
provided 'com.esotericsoftware:kryo:4.0.0'
3640
}

0 commit comments

Comments
 (0)