Skip to content
Permalink
Browse files

Upgrade to RN 0.60

  • Loading branch information...
axemclion committed Jul 4, 2019
1 parent 14fb649 commit 40b121042a51f85307cf4b05a9fc23d98e5c29a4
@@ -93,6 +93,15 @@ def enableSeparateBuildPerCPUArchitecture = false
*/
def enableProguardInReleaseBuilds = false

/**
* Use international variant JavaScriptCore
* International variant includes ICU i18n library and necessary data allowing to use
* e.g. Date.toLocaleString and String.localeCompare that give correct results
* when using with locales other than en-US.
* Note that this variant is about 6MiB larger per architecture than default.
*/
def useIntlJsc = false

android {
compileSdkVersion rootProject.ext.compileSdkVersion
// buildToolsVersion rootProject.ext.buildToolsVersion
@@ -151,6 +160,7 @@ android {
}

dependencies {
implementation project(':@react-native-community_netinfo')
implementation project(':react-native-device-info')
implementation project(':@react-native-community_async-storage')
implementation project(':appcenter-analytics')
@@ -169,8 +179,14 @@ dependencies {
implementation project(':react-native-splash-screen')
implementation project(':react-native-screens')
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
implementation 'androidx.appcompat:appcompat:1.0.0'
implementation "com.facebook.react:react-native:+" // From node_modules
// JSC from node_modules
if (useIntlJsc) {
implementation 'org.webkit:android-jsc-intl:+'
} else {
implementation 'org.webkit:android-jsc:+'
}
implementation 'com.google.android.exoplayer:exoplayer:2.7.1'
implementation 'com.google.protobuf.nano:protobuf-javanano:3.0.0-alpha-7'
implementation 'com.amazonaws:aws-android-sdk-core:2.2.+'
@@ -186,3 +202,5 @@ task copyDownloadableDepsToLibs(type: Copy) {
from configurations.compile
into 'libs'
}

//apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
@@ -4,6 +4,7 @@

import com.airbnb.android.react.lottie.LottiePackage;
import com.facebook.react.ReactApplication;
import com.reactnativecommunity.netinfo.NetInfoPackage;
import com.learnium.RNDeviceInfo.RNDeviceInfo;
import com.reactnativecommunity.asyncstorage.AsyncStoragePackage;
import com.reactcommunity.rnlocalize.RNLocalizePackage;
@@ -36,6 +37,7 @@ public boolean getUseDeveloperSupport() {
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
new MainReactPackage(),
new NetInfoPackage(),
new RNDeviceInfo(),
new AsyncStoragePackage(),
new RNLocalizePackage(),
@@ -13,7 +13,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.0'
classpath("com.android.tools.build:gradle:3.4.1")

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
@@ -28,9 +28,15 @@ allprojects {
jcenter()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url "$rootDir/../node_modules/react-native/android"
url("$rootDir/../node_modules/react-native/android")
}
maven { url "https://jitpack.io" }
maven {
// Android JSC is installed from npm
url("$rootDir/../node_modules/jsc-android/dist")
}
google()
jcenter()
configurations.all {
resolutionStrategy {
force "com.android.support:appcompat-v7:$supportLibVersion"
@@ -16,3 +16,5 @@
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
android.enableJetifier=true
android.useAndroidX=true
@@ -1,4 +1,7 @@
rootProject.name = 'ChainReactApp'
include ':@react-native-community_netinfo'
project(':@react-native-community_netinfo').projectDir = new File(rootProject.projectDir, '../node_modules/@react-native-community/netinfo/android')
apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
include ':react-native-device-info'
project(':react-native-device-info').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-device-info/android')

@@ -16,16 +16,19 @@
"ios": "react-native run-ios",
"lint:ts": "tslint -p .",
"lint": "npm-run-all lint:*",
"postinstall": "test -n \"$NOYARNPOSTINSTALL\" || solidarity",
"postinstall": "npm run upgrade-060 && test -n \"$NOYARNPOSTINSTALL\" || solidarity",
"precommit": "lint-staged",
"prepare": "patch-package",
"start": "node node_modules/react-native/local-cli/cli.js start",
"storybook": "storybook start -p 9001 --skip-packager",
"test": "NODE_ENV=test TZ=America/Los_Angeles jest"
"test": "NODE_ENV=test TZ=America/Los_Angeles jest",
"upgrade-060": "npm run fix-redux-offline && node_modules/.bin/jetify",
"fix-redux-offline": "find node_modules -name \"detectNetwork.native.js\" -exec sed -i '' s/require\\(\\'react-native\\'\\)\\;/require\\(\\'react-native\\'\\)\\;_reactNative\\.NetInfo=require\\(\\'\\@react\\-native\\-community\\\\/netinfo\\'\\)\\;/g {} + "
},
"dependencies": {
"@mapbox/react-native-mapbox-gl": "https://github.com/nitaliano/react-native-mapbox-gl#master",
"@react-native-community/async-storage": "^1.5.0",
"@react-native-community/netinfo": "^3.2.1",
"apisauce": "^1.0.3",
"apollo-boost": "^0.4.3",
"apollo-client": "^2.6.3",
@@ -47,9 +50,9 @@
"mobx-state-tree": "^3.10.1",
"prop-types": "^15.7.2",
"ramda": "^0.26.1",
"react": "16.8.3",
"react": "16.8.6",
"react-apollo": "^2.5.8",
"react-native": "0.59.9",
"react-native": "0.60.0",
"react-native-device-info": "^2.1.3",
"react-native-dotenv": "^0.2.0",
"react-native-gesture-handler": "^1.3.0",
@@ -71,6 +74,7 @@
"@babel/runtime": "^7.4.5",
"@emotion/core": "^10.0.14",
"@emotion/styled": "^10.0.14",
"@react-native-community/eslint-config": "^0.0.5",
"@storybook/addon-storyshots": "^5.1.9",
"@storybook/react-native": "^5.1.9",
"@storybook/theming": "^5.1.9",
@@ -83,8 +87,10 @@
"@types/react-test-renderer": "^16.8.2",
"babel-jest": "^24.8.0",
"babel-plugin-transform-inline-environment-variables": "^0.4.3",
"eslint": "^6.0.1",
"husky": "^0.14.3",
"jest": "^24.8.0",
"jetifier": "^1.6.1",
"lint-staged": "^7.0.0",
"metro-react-native-babel-preset": "^0.54.1",
"npm-run-all": "^4.1.2",
@@ -94,7 +100,7 @@
"react-dom": "^16.2.0",
"react-native-typescript-transformer": "^1.2.10",
"react-powerplug": "^1.0.0",
"react-test-renderer": "16.8.3",
"react-test-renderer": "16.8.6",
"solidarity": "^2.1.0",
"tslint": "^5.18.0",
"tslint-config-prettier": "^1.10.0",

0 comments on commit 40b1210

Please sign in to comment.
You can’t perform that action at this time.