Преглед изворни кода

Merge pull request #199 from Folleah/patch-1

Fix dependency incompatibility
Gaëtan Renaudeau пре 5 година
родитељ
комит
4a01cbf1d4
No account linked to committer's email address
1 измењених фајлова са 10 додато и 7 уклоњено
  1. 10
    7
      android/build.gradle

+ 10
- 7
android/build.gradle Прегледај датотеку

@@ -1,3 +1,7 @@
1
+def safeExtGet(prop, fallback) {
2
+    rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
3
+}
4
+
1 5
 buildscript {
2 6
     /* In case of submodule usage, do not try to apply own repositories and plugins,
3 7
         root project is responsible for that. */
@@ -15,12 +19,12 @@ buildscript {
15 19
 apply plugin: 'com.android.library'
16 20
 
17 21
 android {
18
-    compileSdkVersion 27
19
-    buildToolsVersion "28.0.3"
22
+    compileSdkVersion safeExtGet('compileSdkVersion', 27)
23
+    buildToolsVersion safeExtGet('buildToolsVersion', '28.0.3')
20 24
 
21 25
     defaultConfig {
22
-        minSdkVersion 16
23
-        targetSdkVersion 27
26
+        minSdkVersion safeExtGet('minSdkVersion', 16)
27
+        targetSdkVersion safeExtGet('targetSdkVersion', 27)
24 28
 
25 29
         versionCode 1
26 30
         versionName "1.0"
@@ -42,7 +46,6 @@ repositories {
42 46
 }
43 47
 
44 48
 dependencies {
45
-    implementation 'com.android.support:support-v4:27.+'
46
-
49
+    implementation "com.android.support:support-v4:${safeExtGet('supportLibVersion', '27.+')}"
47 50
     api 'com.facebook.react:react-native:+'
48
-}
51
+}