File tree Expand file tree Collapse file tree 2 files changed +16
-8
lines changed Expand file tree Collapse file tree 2 files changed +16
-8
lines changed Original file line number Diff line number Diff line change @@ -10,13 +10,17 @@ buildscript {
10
10
11
11
apply plugin : ' com.android.library'
12
12
13
+ def safeExtGet (prop , fallback ) {
14
+ rootProject. ext. has(prop) ? rootProject. ext. get(prop) : fallback
15
+ }
16
+
13
17
android {
14
- compileSdkVersion 23
15
- buildToolsVersion " 23.0.1"
18
+ compileSdkVersion safeExtGet( ' compileSdkVersion ' , 23 )
19
+ buildToolsVersion safeExtGet( ' buildToolsVersion ' , ' 23.0.1' )
16
20
17
21
defaultConfig {
18
- minSdkVersion 16
19
- targetSdkVersion 22
22
+ minSdkVersion safeExtGet( ' minSdkVersion ' , 16 )
23
+ targetSdkVersion safeExtGet( ' targetSdkVersion ' , 22 )
20
24
versionCode 1
21
25
versionName " 1.0"
22
26
}
Original file line number Diff line number Diff line change @@ -10,13 +10,17 @@ buildscript {
10
10
11
11
apply plugin : ' com.android.library'
12
12
13
+ def safeExtGet (prop , fallback ) {
14
+ rootProject. ext. has(prop) ? rootProject. ext. get(prop) : fallback
15
+ }
16
+
13
17
android {
14
- compileSdkVersion 23
15
- buildToolsVersion " 23.0.1"
18
+ compileSdkVersion safeExtGet( ' compileSdkVersion ' , 23 )
19
+ buildToolsVersion safeExtGet( ' buildToolsVersion ' , ' 23.0.1' )
16
20
17
21
defaultConfig {
18
- minSdkVersion 16
19
- targetSdkVersion 22
22
+ minSdkVersion safeExtGet( ' minSdkVersion ' , 16 )
23
+ targetSdkVersion safeExtGet( ' targetSdkVersion ' , 22 )
20
24
versionCode 1
21
25
versionName " 1.0"
22
26
}
You can’t perform that action at this time.
0 commit comments