Skip to content

Commit 44ac41f

Browse files
author
Petter Hesselberg
committed
Upgrade to RN 0.60.5
1 parent 276c260 commit 44ac41f

File tree

5 files changed

+798
-614
lines changed

5 files changed

+798
-614
lines changed

android/app/build.gradle

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ project.ext.react = [
3333
// Whether to bundle JS and assets in release mode
3434
bundleInRelease: true,
3535

36+
enableHermes: false,
37+
3638
// Whether to bundle JS and assets in another build variant (if configured).
3739
// See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants
3840
// The configuration property can be in the following formats
@@ -164,4 +166,6 @@ android {
164166
dependencies {
165167
implementation fileTree(dir: 'libs', include: ['*.jar'])
166168
implementation("com.facebook.react:react-native:$rootProject.ext.reactNativeVersion")
169+
//noinspection GradleDynamicVersion
170+
implementation 'org.webkit:android-jsc:+'
167171
}

android/build.gradle

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@ import groovy.json.JsonSlurper
44

55
buildscript {
66
repositories {
7-
jcenter()
87
google()
8+
jcenter()
99
}
10+
1011
dependencies {
1112
classpath 'com.android.tools.build:gradle:3.4.2'
1213

@@ -15,22 +16,29 @@ buildscript {
1516
}
1617
}
1718

19+
final reactNativePath = '/react-native/android'
20+
final jscAndroidPath = '/jsc-android/dist'
21+
1822
allprojects {
1923
repositories {
2024
maven {
2125
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
22-
url findReactNative()
26+
url findNodeModules() + reactNativePath
27+
}
28+
29+
maven {
30+
// Android JSC is installed from npm
31+
url findNodeModules() + jscAndroidPath
2332
}
2433

25-
mavenLocal()
26-
jcenter()
2734
google()
35+
jcenter()
2836
}
2937
}
3038

31-
final findReactNative() {
32-
final reactNativePath = 'node_modules/react-native/android'
33-
final notFoundMessage = 'Unable to find React Native. Have you run yarn from the root?'
39+
final findNodeModules() {
40+
final reactNativePath = 'node_modules'
41+
final notFoundMessage = 'Unable to find node_modules folder. Have you run yarn from the root?'
3442

3543
def root = file("$rootDir")
3644
if (root == null) {
@@ -101,9 +109,5 @@ final getProjectVersion() {
101109

102110
println "Project version: $version"
103111

104-
if (version.startsWith('^')) {
105-
version = version.substring(1)
106-
}
107-
108112
return version
109113
}

android/settings.gradle

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
rootProject.name = 'ReactNativeActivityDemo'
22

3+
// https://react-native-community.github.io/upgrade-helper/?from=0.59.10&to=0.60.0
4+
apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle");
5+
applyNativeModulesSettingsGradle(settings)
6+
37
include ':app'

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
"type": "git",
55
"url": "https://github.com/petterh/react-native-android-activity.git"
66
},
7-
"version": "5.0.3",
7+
"version": "5.0.4",
88
"private": true,
99
"scripts": {
1010
"start": "node node_modules/react-native/local-cli/cli.js start"
1111
},
1212
"dependencies": {
13-
"react": "16.8.3",
14-
"react-native": "0.59.9"
13+
"react": "16.8.6",
14+
"react-native": "0.60.5"
1515
},
1616
"devDependencies": {
1717
"babel-loader": "8.0.6",

0 commit comments

Comments
 (0)