Skip to content

Commit 9554ca7

Browse files
author
Nicolas TORRE
committed
Fix android gradle minSdkVersion for react-native 0.64 #36
Signed-off-by: Nicolas TORRE <n.torre@e2time.com>
1 parent 90342fe commit 9554ca7

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 @@
1+
def safeExtGet(prop, fallback) {
2+
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
3+
}
4+
15
apply plugin: 'com.android.library'
26

37
android {
4-
compileSdkVersion 28
5-
buildToolsVersion "28.0.3"
8+
compileSdkVersion safeExtGet('compileSdkVersion', 28)
9+
buildToolsVersion safeExtGet('buildToolsVersion', "28.0.3")
610

711
defaultConfig {
8-
minSdkVersion 16
9-
targetSdkVersion 28
12+
minSdkVersion safeExtGet('minSdkVersion', 16)
13+
targetSdkVersion safeExtGet('targetSdkVersion', 28)
1014
versionCode 1
1115
versionName "1.0"
1216
ndk {

0 commit comments

Comments
 (0)