Skip to content

Commit 32c7ea6

Browse files
authored
Merge pull request #69 from kashishgrover/master
Update build.gradle for compatibility with RN >= 0.56
2 parents 486181e + 279b411 commit 32c7ea6

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,12 +1,16 @@
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 26
5-
buildToolsVersion "26.0.3"
8+
compileSdkVersion safeExtGet('compileSdkVersion', 26)
9+
buildToolsVersion safeExtGet('buildToolsVersion', '26.0.3')
610

711
defaultConfig {
8-
minSdkVersion 16
9-
targetSdkVersion 26
12+
minSdkVersion safeExtGet('minSdkVersion', 16)
13+
targetSdkVersion safeExtGet('targetSdkVersion', 26)
1014
}
1115
lintOptions {
1216
warning 'InvalidPackage'

0 commit comments

Comments
 (0)