Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to React Native 0.57 #2955

Closed
wants to merge 32 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
f6727aa
flow: Add missing prop `is_mentioned` to `Message` type
borisyankov Jul 26, 2018
9df5158
flow: Fix `children` type errors in two components
borisyankov Sep 11, 2018
1499875
flow: Change Style type to `any`
borisyankov Sep 17, 2018
5f09d7b
webview: Fix for exception when no node long-pressed
borisyankov Sep 20, 2018
5d09331
Fix Xcode project settings warnings
borisyankov Oct 4, 2018
4c89788
flow: Ignore a Flow "error" that is not one
borisyankov Sep 20, 2018
cea100b
flow: Add TouchEvent types to params
borisyankov Aug 12, 2018
a7f98af
flow: Make `getMessageNode` input and result nullable
borisyankov Oct 4, 2018
dcb6d7d
flow: Add MouseEvent type
borisyankov Oct 3, 2018
a7089aa
flow: Update .flowconfig
borisyankov Sep 21, 2018
fe301de
Upgrade Gradle to 3.5.1
borisyankov Sep 23, 2018
2b2c100
Update Gradle configs
borisyankov Sep 23, 2018
da6fa46
Upgrade to React Native 0.56
borisyankov Sep 23, 2018
c5272e3
Update Flow Typed definitions
borisyankov Aug 2, 2018
64dfe15
jest: Fix Jest tests not running with Babel 7
borisyankov Aug 2, 2018
d04d3e2
flow: Give a type to the containing function in `Input`
borisyankov Sep 15, 2018
1db3356
flow: Ignore a React Navigation type error
borisyankov Sep 16, 2018
e929d8b
flow: Add $FlowFixMe comments for `ZulipStatusBar`
borisyankov Sep 17, 2018
ac3497d
flow: Import `ReactTestRenderer` explicitly
borisyankov Sep 20, 2018
24ea769
flow: Ignore an incorrect error about HTML StyleSheet
borisyankov Sep 20, 2018
1bbe226
flow: Remove a couple of error suppression comments
borisyankov Sep 20, 2018
ea947ed
Upgraded Project settings to be compatible with Xcode 9.4
borisyankov Sep 17, 2018
13b292e
Update gradle wrapper binary and scripts
borisyankov Sep 16, 2018
c480073
Upgrade Gradle to 4.4
borisyankov Oct 4, 2018
bd7e072
Remove CLI configuration
borisyankov Sep 12, 2018
2e22b94
build: Upgrade config and use Gradle 3
borisyankov Sep 12, 2018
876d1e8
config: Replace `compile` configuration with `implementation`
borisyankov Sep 12, 2018
e62d46b
Upgrade to React Native 0.57.1
borisyankov Sep 12, 2018
334fd08
ZulipSwitch: Replace component's deprecated props
borisyankov Sep 18, 2018
8074c66
Upgrade to Babel 7
borisyankov Sep 24, 2018
817e43e
dependencies: Upgrade `react-native-fetch-blob`
borisyankov Oct 7, 2018
9a6d109
SpinningProgress: Replace temporarily with SpinningProgressImg
borisyankov Oct 9, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"presets": [
"react-native"
],
"env": {
"production": {
"plugins": ["transform-remove-console"]
}
}
}
"presets": [
"module:metro-react-native-babel-preset"
],
"env": {
"production": {
"plugins": ["transform-remove-console"]
}
}
}
18 changes: 17 additions & 1 deletion .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,25 @@ sketchy-null
[options]
emoji=true

esproposal.optional_chaining=enable
esproposal.nullish_coalescing=enable

include_warnings=true

module.system=haste
module.system.haste.use_name_reducers=true
# get basename
module.system.haste.name_reducers='^.*/\([a-zA-Z0-9$_.-]+\.js\(\.flow\)?\)$' -> '\1'
# strip .js or .js.flow suffix
module.system.haste.name_reducers='^\(.*\)\.js\(\.flow\)?$' -> '\1'
# strip .ios suffix
module.system.haste.name_reducers='^\(.*\)\.ios$' -> '\1'
module.system.haste.name_reducers='^\(.*\)\.android$' -> '\1'
module.system.haste.name_reducers='^\(.*\)\.native$' -> '\1'
module.system.haste.paths.blacklist=.*/__tests__/.*
module.system.haste.paths.blacklist=.*/__mocks__/.*
module.system.haste.paths.blacklist=<PROJECT_ROOT>/node_modules/react-native/Libraries/Animated/src/polyfills/.*
module.system.haste.paths.whitelist=<PROJECT_ROOT>/node_modules/react-native/Libraries/.*

munge_underscores=true

Expand All @@ -81,4 +97,4 @@ suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError

[version]
^0.67.0
^0.78.0
42 changes: 21 additions & 21 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,13 @@ def enableSeparateBuildPerCPUArchitecture = false
def enableProguardInReleaseBuilds = false

android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion

defaultConfig {
applicationId "com.zulipmobile"
minSdkVersion 19
targetSdkVersion 22
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 13
versionName "1.0.13"
ndk {
Expand Down Expand Up @@ -164,23 +164,23 @@ repositories {


dependencies {
compile project(':react-native-text-input-reset')
compile project(':react-native-notifications')
compile project(':react-native-image-picker')
compile project(':react-native-orientation')
compile project(':react-native-sentry')
compile project(':@remobile_react-native-toast')
compile project(':react-native-photo-view')
compile project(':react-native-fetch-blob')
compile project(':react-native-sound')
compile project(':react-native-device-info')
compile project(':react-native-vector-icons')
compile fileTree(dir: "libs", include: ["*.jar"])
compile "com.android.support:appcompat-v7:23.0.1"
compile "me.leolin:ShortcutBadger:1.1.16@aar"
compile "com.facebook.react:react-native:+" // From node_modules
compile 'com.facebook.fresco:animated-gif:1.3.0' // For animated GIF support
compile 'com.android.support:customtabs:23.0.1'
implementation project(':react-native-text-input-reset')
implementation project(':react-native-notifications')
implementation project(':react-native-image-picker')
implementation project(':react-native-orientation')
implementation project(':react-native-sentry')
implementation project(':@remobile_react-native-toast')
implementation project(':react-native-photo-view')
implementation project(':rn-fetch-blob')
implementation project(':react-native-sound')
implementation project(':react-native-device-info')
implementation project(':react-native-vector-icons')
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
implementation "me.leolin:ShortcutBadger:1.1.16@aar"
implementation "com.facebook.react:react-native:+" // From node_modules
implementation 'com.facebook.fresco:animated-gif:1.3.0' // For animated GIF support
implementation 'com.android.support:customtabs:23.0.1'

}

Expand Down
17 changes: 16 additions & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.+'
classpath 'com.android.tools.build:gradle:3.1.4'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand All @@ -20,5 +21,19 @@ allprojects {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url "$rootDir/../node_modules/react-native/android"
}
google()
}
}

ext {
buildToolsVersion = "27.0.3"
minSdkVersion = 19
compileSdkVersion = 27
targetSdkVersion = 26
supportLibVersion = "27.1.1"
}

task wrapper(type: Wrapper) {
gradleVersion = '4.4'
distributionUrl = distributionUrl.replace("bin", "all")
}
2 changes: 0 additions & 2 deletions android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,3 @@
# 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.useDeprecatedNdk=true
Binary file modified android/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 1 addition & 2 deletions android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#Sun Mar 19 12:07:15 PDT 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
78 changes: 43 additions & 35 deletions android/gradlew
Original file line number Diff line number Diff line change
@@ -1,25 +1,43 @@
#!/usr/bin/env bash
#!/usr/bin/env sh

##############################################################################
##
## Gradle start up script for UN*X
##
##############################################################################

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null

APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"

warn ( ) {
warn () {
echo "$*"
}

die ( ) {
die () {
echo
echo "$*"
echo
Expand All @@ -30,6 +48,7 @@ die ( ) {
cygwin=false
msys=false
darwin=false
nonstop=false
case "`uname`" in
CYGWIN* )
cygwin=true
Expand All @@ -40,31 +59,11 @@ case "`uname`" in
MINGW* )
msys=true
;;
NONSTOP* )
nonstop=true
;;
esac

# For Cygwin, ensure paths are in UNIX format before anything is touched.
if $cygwin ; then
[ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
fi

# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >&-
APP_HOME="`pwd -P`"
cd "$SAVED" >&-

CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar

# Determine the Java command to use to start the JVM.
Expand All @@ -90,7 +89,7 @@ location of your Java installation."
fi

# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
Expand All @@ -114,6 +113,7 @@ fi
if $cygwin ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`

# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
Expand Down Expand Up @@ -154,11 +154,19 @@ if $cygwin ; then
esac
fi

# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
function splitJvmOpts() {
JVM_OPTS=("$@")
# Escape application args
save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
APP_ARGS=$(save "$@")

# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"

# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
cd "$(dirname "$0")"
fi

exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
exec "$JAVACMD" "$@"
14 changes: 4 additions & 10 deletions android/gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal

@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=

set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=

@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome

Expand Down Expand Up @@ -46,10 +46,9 @@ echo location of your Java installation.
goto fail

:init
@rem Get command-line arguments, handling Windowz variants
@rem Get command-line arguments, handling Windows variants

if not "%OS%" == "Windows_NT" goto win9xME_args
if "%@eval[2+2]" == "4" goto 4NT_args

:win9xME_args
@rem Slurp the command line arguments.
Expand All @@ -60,11 +59,6 @@ set _SKIP=2
if "x%~1" == "x" goto execute

set CMD_LINE_ARGS=%*
goto execute

:4NT_args
@rem Get arguments from the 4NT Shell from JP Software
set CMD_LINE_ARGS=%$

:execute
@rem Setup the command line
Expand Down
4 changes: 2 additions & 2 deletions android/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ include ':@remobile_react-native-toast'
project(':@remobile_react-native-toast').projectDir = new File(rootProject.projectDir, '../node_modules/@remobile/react-native-toast/android')
include ':react-native-photo-view'
project(':react-native-photo-view').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-photo-view/android')
include ':react-native-fetch-blob'
project(':react-native-fetch-blob').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-fetch-blob/android')
include ':rn-fetch-blob'
project(':rn-fetch-blob').projectDir = new File(rootProject.projectDir, '../node_modules/rn-fetch-blob/android')
include ':react-native-sound'
project(':react-native-sound').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-sound/android')
include ':react-native-device-info'
Expand Down
4 changes: 2 additions & 2 deletions flow-typed/npm/@expo/react-native-action-sheet_vx.x.x.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// flow-typed signature: f1fdcaf890a7db8277afdd14a3b0672b
// flow-typed version: <<STUB>>/@expo/react-native-action-sheet_v1.0.2/flow_v0.67.0
// flow-typed signature: 5d38eea51d1f55cfd7aecb564cfc7151
// flow-typed version: <<STUB>>/@expo/react-native-action-sheet_v1.0.2/flow_v0.75.0

/**
* This is an autogenerated libdef stub for:
Expand Down
4 changes: 2 additions & 2 deletions flow-typed/npm/@remobile/react-native-toast_vx.x.x.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// flow-typed signature: 28d97691964914568bdf9208cd22ecdc
// flow-typed version: <<STUB>>/@remobile/react-native-toast_v^1.0.7/flow_v0.67.0
// flow-typed signature: a539ff5bcd7282409bcdc2e79d249b0e
// flow-typed version: <<STUB>>/@remobile/react-native-toast_v^1.0.7/flow_v0.75.0

/**
* This is an autogenerated libdef stub for:
Expand Down
4 changes: 2 additions & 2 deletions flow-typed/npm/babel-core_vx.x.x.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// flow-typed signature: 9f307725d254fc3553aacb8058164f5c
// flow-typed version: <<STUB>>/babel-core_v^6.26.3/flow_v0.67.0
// flow-typed signature: 5d3a72a26c3bff277dd2963441da87d0
// flow-typed version: <<STUB>>/babel-core_v^6.26.3/flow_v0.75.0

/**
* This is an autogenerated libdef stub for:
Expand Down
4 changes: 2 additions & 2 deletions flow-typed/npm/babel-eslint_vx.x.x.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// flow-typed signature: 5b819be5c41a4b8c1c403ebe64a6b020
// flow-typed version: <<STUB>>/babel-eslint_v^8.2.3/flow_v0.67.0
// flow-typed signature: a3eb0ebc8bc7ac9a4fc5bdafd7a55c02
// flow-typed version: <<STUB>>/babel-eslint_v^8.2.3/flow_v0.75.0

/**
* This is an autogenerated libdef stub for:
Expand Down
4 changes: 2 additions & 2 deletions flow-typed/npm/babel-jest_vx.x.x.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// flow-typed signature: 3f9ec572098b1bb2ceea5ced9b73172a
// flow-typed version: <<STUB>>/babel-jest_v^22.4.4/flow_v0.67.0
// flow-typed signature: 98a64c46a3bc281965192fb1e56768f7
// flow-typed version: <<STUB>>/babel-jest_v^23.4.0/flow_v0.75.0

/**
* This is an autogenerated libdef stub for:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// flow-typed signature: 6def95892e49e53e385a6868ac5c6392
// flow-typed version: <<STUB>>/babel-plugin-transform-remove-console_v^6.9.4/flow_v0.67.0
// flow-typed signature: aa582480a121ebcbce3de8418690ea02
// flow-typed version: <<STUB>>/babel-plugin-transform-remove-console_v^6.9.4/flow_v0.75.0

/**
* This is an autogenerated libdef stub for:
Expand Down
Loading