Browse Source

update gradle and remove weird entry point (#2330)

Daniel Zlotin 6 years ago
parent
commit
fe6f90b093
No account linked to committer's email address

+ 0
- 1
index.android.js View File

@@ -1 +0,0 @@
1
-require('./playground/index');

+ 0
- 1
index.ios.js View File

@@ -1 +0,0 @@
1
-require('./playground/index');

+ 1
- 1
lib/android/app/build.gradle View File

@@ -3,7 +3,7 @@ apply from: '../prepare-robolectric.gradle'
3 3
 
4 4
 android {
5 5
     compileSdkVersion 25
6
-    buildToolsVersion "25.0.3"
6
+    buildToolsVersion "27.0.1"
7 7
 
8 8
     defaultConfig {
9 9
         minSdkVersion 16

+ 6
- 1
lib/android/build.gradle View File

@@ -2,10 +2,13 @@
2 2
 
3 3
 buildscript {
4 4
     repositories {
5
+        mavenLocal()
6
+        mavenCentral()
7
+        google()
5 8
         jcenter()
6 9
     }
7 10
     dependencies {
8
-        classpath 'com.android.tools.build:gradle:2.3.0'
11
+        classpath 'com.android.tools.build:gradle:3.0.1'
9 12
 
10 13
         // NOTE: Do not place your application dependencies here; they belong
11 14
         // in the individual module build.gradle files
@@ -15,6 +18,8 @@ buildscript {
15 18
 allprojects {
16 19
     repositories {
17 20
         mavenLocal()
21
+        mavenCentral()
22
+        google()
18 23
         jcenter()
19 24
         maven {
20 25
             // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm

+ 5
- 0
lib/android/gradle.properties View File

@@ -16,3 +16,8 @@
16 16
 # This option should only be used with decoupled projects. More details, visit
17 17
 # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18 18
 # org.gradle.parallel=true
19
+
20
+# Disable incremental resource processing as it broke relase build
21
+# https://github.com/react-community/react-navigation/issues/1976
22
+# https://developer.android.com/studio/build/gradle-plugin-3-0-0.html
23
+android.enableAapt2=false

+ 1
- 1
playground/android/app/build.gradle View File

@@ -9,7 +9,7 @@ apply from: "../../../node_modules/react-native/react.gradle"
9 9
 
10 10
 android {
11 11
     compileSdkVersion 25
12
-    buildToolsVersion "25.0.3"
12
+    buildToolsVersion "27.0.1"
13 13
 
14 14
     defaultConfig {
15 15
         applicationId "com.reactnativenavigation.playground"

+ 5
- 3
playground/android/build.gradle View File

@@ -2,8 +2,10 @@
2 2
 
3 3
 buildscript {
4 4
     repositories {
5
-        jcenter()
5
+        mavenLocal()
6
+        mavenCentral()
6 7
         google()
8
+        jcenter()
7 9
     }
8 10
     dependencies {
9 11
         classpath 'com.android.tools.build:gradle:3.0.1'
@@ -15,10 +17,10 @@ buildscript {
15 17
 
16 18
 allprojects {
17 19
     repositories {
18
-        jcenter()
19
-        google()
20 20
         mavenLocal()
21 21
         mavenCentral()
22
+        google()
23
+        jcenter()
22 24
         maven {
23 25
             // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
24 26
             url "$rootDir/../../node_modules/react-native/android"

+ 4
- 0
playground/android/gradle.properties View File

@@ -18,3 +18,7 @@
18 18
 # org.gradle.parallel=true
19 19
 
20 20
 android.useDeprecatedNdk=false
21
+# Disable incremental resource processing as it broke relase build
22
+# https://github.com/react-community/react-navigation/issues/1976
23
+# https://developer.android.com/studio/build/gradle-plugin-3-0-0.html
24
+android.enableAapt2=false

+ 1
- 1
playground/android/gradle/wrapper/gradle-wrapper.properties View File

@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
3 3
 distributionPath=wrapper/dists
4 4
 zipStoreBase=GRADLE_USER_HOME
5 5
 zipStorePath=wrapper/dists
6
-distributionUrl=https\://services.gradle.org/distributions/gradle-4.3.1-bin.zip
6
+distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-bin.zip

+ 1
- 1
scripts/start.js View File

@@ -6,5 +6,5 @@ function run() {
6 6
   exec.killPort(8081);
7 7
   exec.execSync(`watchman watch-del-all || true`);
8 8
   exec.execSync(`adb reverse tcp:8081 tcp:8081 || true`);
9
-  exec.execSync(`node ./node_modules/react-native/local-cli/cli.js start`);
9
+  exec.execSync(`node ./node_modules/react-native/local-cli/cli.js start --root ./playground/`);
10 10
 }