Skip to content

Commit 4a01cbf

Browse files
authored
Merge pull request #199 from Folleah/patch-1
Fix dependency incompatibility
2 parents 9caa300 + 5610ebb commit 4a01cbf

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

android/build.gradle

Lines changed: 10 additions & 7 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
/* In case of submodule usage, do not try to apply own repositories and plugins,
37
root project is responsible for that. */
@@ -15,12 +19,12 @@ buildscript {
1519
apply plugin: 'com.android.library'
1620

1721
android {
18-
compileSdkVersion 27
19-
buildToolsVersion "28.0.3"
22+
compileSdkVersion safeExtGet('compileSdkVersion', 27)
23+
buildToolsVersion safeExtGet('buildToolsVersion', '28.0.3')
2024

2125
defaultConfig {
22-
minSdkVersion 16
23-
targetSdkVersion 27
26+
minSdkVersion safeExtGet('minSdkVersion', 16)
27+
targetSdkVersion safeExtGet('targetSdkVersion', 27)
2428

2529
versionCode 1
2630
versionName "1.0"
@@ -42,7 +46,6 @@ repositories {
4246
}
4347

4448
dependencies {
45-
implementation 'com.android.support:support-v4:27.+'
46-
49+
implementation "com.android.support:support-v4:${safeExtGet('supportLibVersion', '27.+')}"
4750
api 'com.facebook.react:react-native:+'
48-
}
51+
}

0 commit comments

Comments
 (0)