Skip to content

Commit f7209de

Browse files
youngjuningcsath
authored andcommitted
Update build.gradle (#9)
1 parent 12c6355 commit f7209de

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

android/build.gradle

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,17 @@ buildscript {
1111

1212
apply plugin: 'com.android.library'
1313

14+
def safeExtGet(prop, fallback) {
15+
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
16+
}
17+
1418
android {
15-
compileSdkVersion 23
16-
buildToolsVersion "23.0.1"
19+
compileSdkVersion safeExtGet('compileSdkVersion', 23)
20+
buildToolsVersion safeExtGet("buildToolsVersion", "23.0.1")
1721

1822
defaultConfig {
19-
minSdkVersion 16
20-
targetSdkVersion 22
23+
minSdkVersion safeExtGet('minSdkVersion', 16)
24+
targetSdkVersion safeExtGet('targetSdkVersion', 22)
2125
versionCode 1
2226
versionName "1.0"
2327
}
@@ -33,4 +37,4 @@ repositories {
3337
dependencies {
3438
compile 'com.facebook.react:react-native:+'
3539
}
36-
40+

0 commit comments

Comments
 (0)