Skip to content

Commit fbb4275

Browse files
rmevans9charpeni
authored andcommitted
Make this work with RN 56 (#283)
* Make this work with RN 56 * Don't forget to checkin the method too...
1 parent a308f3c commit fbb4275

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

android/build.gradle

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
def safeExtGet(prop, fallback) {
2+
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
3+
}
4+
15
buildscript {
26
repositories {
37
jcenter()
@@ -11,12 +15,12 @@ buildscript {
1115
apply plugin: 'com.android.library'
1216

1317
android {
14-
compileSdkVersion 25
15-
buildToolsVersion "25.0.3"
18+
compileSdkVersion safeExtGet('compileSdkVersion', 25)
19+
buildToolsVersion safeExtGet('buildToolsVersion', '25.0.3')
1620

1721
defaultConfig {
18-
minSdkVersion 16
19-
targetSdkVersion 22
22+
minSdkVersion safeExtGet('minSdkVersion', 16)
23+
targetSdkVersion safeExtGet('targetSdkVersion', 22)
2024
versionCode 1
2125
versionName "1.0"
2226

0 commit comments

Comments
 (0)