Skip to content

Commit 0633c31

Browse files
committed
Upgrade to React Native 0.56
Implements zulip#2788 Upgrade dependencies, config and build files to RN 0.56 Previous upgrades were done manually by updating dependencies and .flowconfig This commit contains a full `diff` with previous versions. What was done is: * run react-native-git-upgrade * resolve merge conflicts * update dependencies that were needed but missed by the script
1 parent 9a5db8a commit 0633c31

File tree

12 files changed

+1495
-837
lines changed

12 files changed

+1495
-837
lines changed

.flowconfig

+14-1
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,19 @@ emoji=true
5959
include_warnings=true
6060

6161
module.system=haste
62+
module.system.haste.use_name_reducers=true
63+
# get basename
64+
module.system.haste.name_reducers='^.*/\([a-zA-Z0-9$_.-]+\.js\(\.flow\)?\)$' -> '\1'
65+
# strip .js or .js.flow suffix
66+
module.system.haste.name_reducers='^\(.*\)\.js\(\.flow\)?$' -> '\1'
67+
# strip .ios suffix
68+
module.system.haste.name_reducers='^\(.*\)\.ios$' -> '\1'
69+
module.system.haste.name_reducers='^\(.*\)\.android$' -> '\1'
70+
module.system.haste.name_reducers='^\(.*\)\.native$' -> '\1'
71+
module.system.haste.paths.blacklist=.*/__tests__/.*
72+
module.system.haste.paths.blacklist=.*/__mocks__/.*
73+
module.system.haste.paths.blacklist=<PROJECT_ROOT>/node_modules/react-native/Libraries/Animated/src/polyfills/.*
74+
module.system.haste.paths.whitelist=<PROJECT_ROOT>/node_modules/react-native/Libraries/.*
6275

6376
munge_underscores=true
6477

@@ -81,4 +94,4 @@ suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
8194
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
8295

8396
[version]
84-
^0.67.0
97+
^0.75.0

android/app/build.gradle

+5-5
Original file line numberDiff line numberDiff line change
@@ -91,13 +91,13 @@ def enableSeparateBuildPerCPUArchitecture = false
9191
def enableProguardInReleaseBuilds = false
9292

9393
android {
94-
compileSdkVersion 23
95-
buildToolsVersion "23.0.1"
94+
compileSdkVersion rootProject.ext.compileSdkVersion
95+
buildToolsVersion rootProject.ext.buildToolsVersion
9696

9797
defaultConfig {
9898
applicationId "com.zulipmobile"
99-
minSdkVersion 19
100-
targetSdkVersion 22
99+
minSdkVersion rootProject.ext.minSdkVersion
100+
targetSdkVersion rootProject.ext.targetSdkVersion
101101
versionCode 13
102102
versionName "1.0.13"
103103
ndk {
@@ -178,7 +178,7 @@ dependencies {
178178
compile project(':react-native-device-info')
179179
compile project(':react-native-vector-icons')
180180
compile fileTree(dir: "libs", include: ["*.jar"])
181-
compile "com.android.support:appcompat-v7:23.0.1"
181+
compile "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
182182
compile "me.leolin:ShortcutBadger:1.1.16@aar"
183183
compile "com.facebook.react:react-native:+" // From node_modules
184184
compile 'com.facebook.fresco:animated-gif:1.3.0' // For animated GIF support
Loading
Loading
Loading
Loading
Loading
Loading

android/build.gradle

+17-1
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,13 @@
33
buildscript {
44
repositories {
55
jcenter()
6+
maven {
7+
url 'https://maven.google.com/'
8+
name 'Google'
9+
}
610
}
711
dependencies {
8-
classpath 'com.android.tools.build:gradle:2.2.+'
12+
classpath 'com.android.tools.build:gradle:2.3.3'
913

1014
// NOTE: Do not place your application dependencies here; they belong
1115
// in the individual module build.gradle files
@@ -20,5 +24,17 @@ allprojects {
2024
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
2125
url "$rootDir/../node_modules/react-native/android"
2226
}
27+
maven {
28+
url 'https://maven.google.com/'
29+
name 'Google'
30+
}
2331
}
2432
}
33+
34+
ext {
35+
buildToolsVersion = "26.0.3"
36+
minSdkVersion = 19
37+
compileSdkVersion = 26
38+
targetSdkVersion = 26
39+
supportLibVersion = "26.1.0"
40+
}

android/gradle/wrapper/gradle-wrapper.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-3.5.1-all.zip

package.json

+8-8
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@
4444
"lodash.unescape": "^4.0.1",
4545
"lodash.union": "^4.6.0",
4646
"lodash.uniqby": "^4.4.0",
47-
"react": "16.3.2",
47+
"react": "16.4.1",
4848
"react-intl": "^2.4.0",
49-
"react-native": "^0.55.4",
49+
"react-native": "0.56.1",
5050
"react-native-device-info": "^0.21.5",
5151
"react-native-fetch-blob": "^0.10.8",
5252
"react-native-image-picker": "^0.26.10",
@@ -63,7 +63,7 @@
6363
"react-navigation": "^1.5.12",
6464
"react-navigation-redux-helpers": "^1.1.1",
6565
"react-redux": "^5.0.7",
66-
"react-test-renderer": "16.3.2",
66+
"react-test-renderer": "16.4.1",
6767
"redux": "^4.0.0",
6868
"redux-action-buffer": "^1.2.0",
6969
"redux-batched-actions": "^0.3.0",
@@ -80,9 +80,9 @@
8080
"devDependencies": {
8181
"babel-core": "^6.26.3",
8282
"babel-eslint": "^8.2.3",
83-
"babel-jest": "^22.4.4",
83+
"babel-jest": "^23.4.0",
8484
"babel-plugin-transform-remove-console": "^6.9.4",
85-
"babel-preset-react-native": "^4.0.0",
85+
"babel-preset-react-native": "^5",
8686
"coveralls": "^3.0.1",
8787
"deep-freeze": "^0.0.1",
8888
"detox": "^7.3.7",
@@ -98,11 +98,11 @@
9898
"eslint-plugin-react": "^7.8.2",
9999
"eslint-plugin-react-native": "^3.2.1",
100100
"eslint-plugin-spellcheck": "0.0.6",
101-
"flow-bin": "^0.67.0",
101+
"flow-bin": "0.75",
102102
"flow-coverage-report": "^0.6.0",
103103
"flow-typed": "^2.4.0",
104-
"jest": "^22.4.4",
105-
"jest-cli": "^22.4.4",
104+
"jest": "^23.4.0",
105+
"jest-cli": "^23.4.0",
106106
"jest-react-native": "^18.0.0",
107107
"prettier": "^1.12.1",
108108
"prettier-eslint": "^8.8.1",

0 commit comments

Comments
 (0)