Przeglądaj źródła

Speed `react-native run-android` up

j8
Lyubo Marinov 8 lat temu
rodzic
commit
2fa7e777d6

+ 1
- 2
android/app/build.gradle Wyświetl plik

@@ -37,6 +37,5 @@ android {
37 37
 dependencies {
38 38
     compile fileTree(dir: 'libs', include: ['*.jar'])
39 39
 
40
-    debugCompile project(path: ':sdk', configuration: 'debug')
41
-    releaseCompile project(path: ':sdk', configuration: 'release')
40
+    implementation project(':sdk')
42 41
 }

+ 17
- 2
android/build.gradle Wyświetl plik

@@ -4,9 +4,10 @@
4 4
 buildscript {
5 5
     repositories {
6 6
         jcenter()
7
+        maven { url 'https://maven.google.com' }
7 8
     }
8 9
     dependencies {
9
-        classpath 'com.android.tools.build:gradle:2.2.3'
10
+        classpath 'com.android.tools.build:gradle:3.+'
10 11
 
11 12
         // NOTE: Do not place your application dependencies here; they belong
12 13
         // in the individual module build.gradle files.
@@ -27,7 +28,21 @@ allprojects {
27 28
 
28 29
 ext {
29 30
     compileSdkVersion = 23
30
-    buildToolsVersion = "23.0.1"
31
+    buildToolsVersion = "25.0.3"
31 32
     minSdkVersion    = 16
32 33
     targetSdkVersion = 22
33 34
 }
35
+
36
+// Force the version of the Android build tools we have chosen on all
37
+// subprojects. The forcing was introduced for react-native and the third-party
38
+// modules that we utilize such as react-native-background-timer.
39
+subprojects { subproject ->
40
+    afterEvaluate{
41
+        if (subproject.plugins.hasPlugin('android')
42
+                || subproject.plugins.hasPlugin('android-library')) {
43
+            android {
44
+                buildToolsVersion rootProject.ext.buildToolsVersion
45
+            }
46
+        }
47
+    }
48
+}

+ 1
- 1
android/gradle/wrapper/gradle-wrapper.properties Wyświetl plik

@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
2 2
 distributionPath=wrapper/dists
3 3
 zipStoreBase=GRADLE_USER_HOME
4 4
 zipStorePath=wrapper/dists
5
-distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
5
+distributionUrl=https\://services.gradle.org/distributions/gradle-4.0-all.zip

Ładowanie…
Anuluj
Zapisz