Skip to content

Commit d3228f0

Browse files
committed
Make this work with RN56
1 parent b011b77 commit d3228f0

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 26
15-
buildToolsVersion "26.0.3"
18+
compileSdkVersion safeExtGet('compileSdkVersion', 26)
19+
buildToolsVersion safeExtGet('buildToolsVersion', '26.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)