Skip to content

Commit 1f8a839

Browse files
authored
Update build.gradle (#82)
1 parent fc832b7 commit 1f8a839

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

android/build.gradle

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
buildscript {
32
repositories {
43
jcenter()
@@ -11,12 +10,16 @@ buildscript {
1110

1211
apply plugin: 'com.android.library'
1312

13+
def safeExtGet(prop, fallback) {
14+
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
15+
}
16+
1417
android {
15-
compileSdkVersion 28
18+
compileSdkVersion safeExtGet('compileSdkVersion', 28)
1619

1720
defaultConfig {
18-
minSdkVersion 16
19-
targetSdkVersion 28
21+
minSdkVersion safeExtGet('minSdkVersion', 16)
22+
targetSdkVersion safeExtGet('targetSdkVersion', 28)
2023
versionCode 1
2124
versionName "1.0"
2225
}

0 commit comments

Comments
 (0)