Skip to content

Commit 0f57221

Browse files
get versions from rootProject
1 parent 5e54c83 commit 0f57221

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

android/app/build.gradle

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
apply plugin: "com.android.library"
22

3+
def safeExtGet(prop, fallback) {
4+
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
5+
}
6+
37
android {
4-
compileSdkVersion 23
5-
buildToolsVersion "23.0.1"
8+
compileSdkVersion safeExtGet('compileSdkVersion', 23)
9+
buildToolsVersion safeExtGet('buildToolsVersion', "23.0.1")
610
defaultConfig {
711
minSdkVersion 16
8-
targetSdkVersion 22
12+
targetSdkVersion safeExtGet('targetSdkVersion', 22)
913
versionCode 1
1014
versionName "1.0"
1115
}

0 commit comments

Comments
 (0)