Skip to content

Commit 180afe4

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 f7986bc commit 180afe4

File tree

13 files changed

+1499
-841
lines changed

13 files changed

+1499
-841
lines changed

.flowconfig

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

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

6275
munge_underscores=true
6376

@@ -80,4 +93,4 @@ suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
8093
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
8194

8295
[version]
83-
^0.67.0
96+
^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

ios/ZulipMobile.xcodeproj/project.pbxproj

+4-4
Original file line numberDiff line numberDiff line change
@@ -1710,7 +1710,7 @@
17101710
"$(SRCROOT)/../node_modules/react-native-image-picker/ios",
17111711
);
17121712
INFOPLIST_FILE = ZulipMobileTests/Info.plist;
1713-
IPHONEOS_DEPLOYMENT_TARGET = 8.2;
1713+
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
17141714
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
17151715
LIBRARY_SEARCH_PATHS = (
17161716
"$(inherited)",
@@ -1761,7 +1761,7 @@
17611761
"$(SRCROOT)/../node_modules/react-native-image-picker/ios",
17621762
);
17631763
INFOPLIST_FILE = ZulipMobileTests/Info.plist;
1764-
IPHONEOS_DEPLOYMENT_TARGET = 8.2;
1764+
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
17651765
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
17661766
LIBRARY_SEARCH_PATHS = (
17671767
"$(inherited)",
@@ -1917,7 +1917,7 @@
19171917
"$(SRCROOT)/../node_modules/react-native-vector-icons/RNVectorIconsManager",
19181918
"$(SRCROOT)/../node_modules/react-native-device-info/RNDeviceInfo",
19191919
);
1920-
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
1920+
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
19211921
MTL_ENABLE_DEBUG_INFO = YES;
19221922
ONLY_ACTIVE_ARCH = YES;
19231923
PRODUCT_BUNDLE_IDENTIFIER = org.zulip.ZulipMobile;
@@ -1963,7 +1963,7 @@
19631963
"$(SRCROOT)/../node_modules/react-native-vector-icons/RNVectorIconsManager",
19641964
"$(SRCROOT)/../node_modules/react-native-device-info/RNDeviceInfo",
19651965
);
1966-
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
1966+
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
19671967
MTL_ENABLE_DEBUG_INFO = NO;
19681968
PRODUCT_BUNDLE_IDENTIFIER = org.zulip.ZulipMobile;
19691969
SDKROOT = iphoneos;

package.json

+8-8
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@
4242
"lodash.throttle": "^4.1.1",
4343
"lodash.unescape": "^4.0.1",
4444
"lodash.uniqby": "^4.4.0",
45-
"react": "16.3.2",
45+
"react": "16.4.1",
4646
"react-intl": "^2.4.0",
47-
"react-native": "^0.55.4",
47+
"react-native": "0.56.0",
4848
"react-native-device-info": "^0.21.5",
4949
"react-native-fetch-blob": "^0.10.8",
5050
"react-native-image-picker": "^0.26.10",
@@ -61,7 +61,7 @@
6161
"react-navigation": "^1.5.12",
6262
"react-navigation-redux-helpers": "^1.1.1",
6363
"react-redux": "^5.0.7",
64-
"react-test-renderer": "16.3.2",
64+
"react-test-renderer": "16.4.1",
6565
"redux": "^4.0.0",
6666
"redux-action-buffer": "^1.2.0",
6767
"redux-batched-actions": "^0.3.0",
@@ -78,9 +78,9 @@
7878
"devDependencies": {
7979
"babel-core": "^6.26.3",
8080
"babel-eslint": "^8.2.3",
81-
"babel-jest": "^22.4.4",
81+
"babel-jest": "^23.4.0",
8282
"babel-plugin-transform-remove-console": "^6.9.4",
83-
"babel-preset-react-native": "^4.0.0",
83+
"babel-preset-react-native": "^5",
8484
"coveralls": "^3.0.1",
8585
"deep-freeze": "^0.0.1",
8686
"detox": "^7.3.7",
@@ -96,11 +96,11 @@
9696
"eslint-plugin-react": "^7.8.2",
9797
"eslint-plugin-react-native": "^3.2.1",
9898
"eslint-plugin-spellcheck": "0.0.6",
99-
"flow-bin": "^0.67.0",
99+
"flow-bin": "0.75",
100100
"flow-coverage-report": "^0.5.0",
101101
"flow-typed": "^2.4.0",
102-
"jest": "^22.4.4",
103-
"jest-cli": "^22.4.4",
102+
"jest": "^23.4.0",
103+
"jest-cli": "^23.4.0",
104104
"jest-react-native": "^18.0.0",
105105
"prettier": "^1.12.1",
106106
"prettier-eslint": "^8.8.1",

0 commit comments

Comments
 (0)