From c9c941aac946bfab02192efa02613bb533b21414 Mon Sep 17 00:00:00 2001 From: Scott Kyle Date: Thu, 10 Mar 2016 15:16:31 -0800 Subject: [PATCH] Update apps to use React Native 0.22 React is now a peer dependency, which means we need to add it to our package.json for npm v3 to work properly. --- examples/ReactExample/package.json | 3 ++- examples/ReactNativeBenchmarks/package.json | 3 ++- react-native/android/build.gradle | 7 +++++-- react-native/android/publish_android_template | 6 +++++- tests/react-test-app/android/build.gradle | 6 +++--- tests/react-test-app/package.json | 3 ++- 6 files changed, 19 insertions(+), 9 deletions(-) diff --git a/examples/ReactExample/package.json b/examples/ReactExample/package.json index e24eb959..371d7ea5 100644 --- a/examples/ReactExample/package.json +++ b/examples/ReactExample/package.json @@ -6,7 +6,8 @@ "start": "react-native start" }, "dependencies": { - "react-native": "^0.21.0", + "react": "^0.14.5", + "react-native": "^0.22.0", "realm": "file:../.." } } diff --git a/examples/ReactNativeBenchmarks/package.json b/examples/ReactNativeBenchmarks/package.json index db0a88e1..a46a20d5 100644 --- a/examples/ReactNativeBenchmarks/package.json +++ b/examples/ReactNativeBenchmarks/package.json @@ -6,7 +6,8 @@ "start": "react-native start" }, "dependencies": { - "react-native": "^0.21.0", + "react": "^0.14.5", + "react-native": "^0.22.0", "react-native-sqlite-storage": "^2.1.3", "react-native-store": "^0.4.1", "realm": "file:../.." diff --git a/react-native/android/build.gradle b/react-native/android/build.gradle index 22d2dc21..a4bcdee1 100644 --- a/react-native/android/build.gradle +++ b/react-native/android/build.gradle @@ -12,6 +12,10 @@ allprojects { repositories { mavenLocal() jcenter() + maven { + // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm + url "$projectDir/../../tests/react-test-app/node_modules/react-native/android" + } } } @@ -287,9 +291,8 @@ afterEvaluate { project -> } } - dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) compile 'org.nanohttpd:nanohttpd:2.2.0' - compile 'com.facebook.react:react-native:0.20.+' + compile 'com.facebook.react:react-native:+' // From node_modules } diff --git a/react-native/android/publish_android_template b/react-native/android/publish_android_template index 0fc1ef6b..9031fb2c 100644 --- a/react-native/android/publish_android_template +++ b/react-native/android/publish_android_template @@ -11,6 +11,10 @@ allprojects { repositories { mavenLocal() jcenter() + maven { + // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm + url "$projectDir/../../react-native/android" + } } } @@ -51,5 +55,5 @@ android { dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) compile 'org.nanohttpd:nanohttpd:2.2.0' - compile 'com.facebook.react:react-native:0.20.+' + compile 'com.facebook.react:react-native:+' // From node_modules } diff --git a/tests/react-test-app/android/build.gradle b/tests/react-test-app/android/build.gradle index 77b8e24e..403a0075 100644 --- a/tests/react-test-app/android/build.gradle +++ b/tests/react-test-app/android/build.gradle @@ -6,7 +6,6 @@ buildscript { } dependencies { classpath 'com.android.tools.build:gradle:1.3.1' - classpath 'com.jakewharton.sdkmanager:gradle-plugin:0.12.0' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files @@ -17,8 +16,9 @@ allprojects { repositories { mavenLocal() jcenter() - jcenter { - url "http://dl.bintray.com/mkonicek/maven" + maven { + // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm + url "$projectDir/../../node_modules/react-native/android" } } } diff --git a/tests/react-test-app/package.json b/tests/react-test-app/package.json index c60c7b0d..64031733 100644 --- a/tests/react-test-app/package.json +++ b/tests/react-test-app/package.json @@ -6,7 +6,8 @@ "start": "react-native start" }, "dependencies": { - "react-native": "^0.21.0", + "react": "^0.14.5", + "react-native": "^0.22.0", "react-native-fs": "^1.1.0", "xmlbuilder": "^4.2.1", "realm": "file:../..",