File tree Expand file tree Collapse file tree 1 file changed +6
-13
lines changed Expand file tree Collapse file tree 1 file changed +6
-13
lines changed Original file line number Diff line number Diff line change 1
1
2
2
buildscript {
3
- rootProject. ext {
4
- buildToolsVersion = " 28.0.3"
5
- minSdkVersion = 16
6
- compileSdkVersion = 28
7
- targetSdkVersion = 28
8
- supportLibVersion = " 28.0.0"
9
- }
10
3
repositories {
11
4
google()
12
5
jcenter()
@@ -19,22 +12,22 @@ buildscript {
19
12
}
20
13
}
21
14
15
+ def safeExtGet (prop , fallback ) {
16
+ rootProject. ext. has(prop) ? rootProject. ext. get(prop) : fallback
17
+ }
22
18
23
19
apply plugin : ' com.android.library'
24
20
25
21
android {
26
- compileSdkVersion rootProject . ext . compileSdkVersion
22
+ compileSdkVersion safeExtGet( ' compileSdkVersion' , 28 )
27
23
compileOptions {
28
24
sourceCompatibility JavaVersion . VERSION_1_8
29
25
targetCompatibility JavaVersion . VERSION_1_8
30
26
}
31
27
32
- compileSdkVersion 26
33
- compileSdkVersion rootProject. ext. compileSdkVersion
34
-
35
28
defaultConfig {
36
- minSdkVersion rootProject . ext . minSdkVersion
37
- targetSdkVersion rootProject . ext . targetSdkVersion
29
+ minSdkVersion safeExtGet( ' minSdkVersion' , 16 )
30
+ targetSdkVersion safeExtGet( ' targetSdkVersion' , 28 )
38
31
versionCode 1
39
32
versionName " 1.0"
40
33
ndk {
You can’t perform that action at this time.
0 commit comments