Skip to content
This repository has been archived by the owner on Jun 7, 2023. It is now read-only.

Update to React Native 0.57 #438

Merged
merged 51 commits into from Nov 27, 2018
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
8b1a9c4
Mobile: Update to React Native 0.56
cvarley100 Sep 7, 2018
2b38966
Mobile: Clean up RN update
cvarley100 Sep 10, 2018
e7f903b
Mobile: Remove react-native-keyboard-aware-scroll-view
cvarley100 Sep 10, 2018
a2f9ed7
Mobile: Fix Android keyboard avoidance
cvarley100 Sep 10, 2018
8ffdbd2
Mobile: Fix chart interpolation Android
cvarley100 Sep 10, 2018
a0275ad
Mobile: Fix Android account name cut-off
cvarley100 Sep 10, 2018
8a33352
Merge branch 'develop' into chore/rn-0.56
rajivshah3 Sep 29, 2018
2ae9eba
Mobile: Upgrade React Native to 0.57
rajivshah3 Sep 29, 2018
d4b6876
Bug fixes
rajivshah3 Sep 29, 2018
56226a1
Bug fixes
rajivshah3 Sep 30, 2018
c82d55b
Mobile: Fix hidden back button
rajivshah3 Sep 30, 2018
2719819
Update lockfile
rajivshah3 Oct 7, 2018
20d099a
Merge branch 'develop' into chore/rn-0.57
rajivshah3 Oct 7, 2018
8812ee1
Merge branch 'develop' into chore/rn-0.57
rajivshah3 Oct 20, 2018
9ae2f4b
Mobile: Re-add JVM args
rajivshah3 Oct 21, 2018
0ea33c2
Merge branch 'develop' into chore/rn-0.57
rajivshah3 Oct 21, 2018
bc36d7f
Mobile: Add babel-plugin-jest-hoist to fix Bugsnag mocks
rajivshah3 Oct 21, 2018
8d0bde4
Shared: Fix babel-related mocha issues
rajivshah3 Oct 21, 2018
4f050b9
Merge branch 'develop' into chore/rn-0.57
rajivshah3 Oct 25, 2018
1dfa496
Remove unnecessary patches
rajivshah3 Oct 25, 2018
6698c36
Merge branch 'develop' into chore/rn-0.57
rajivshah3 Oct 27, 2018
7de94df
Update lockfile
rajivshah3 Oct 27, 2018
c25e16e
Mobile: Apply forwardRef fix
rajivshah3 Oct 28, 2018
63cb170
Mobile: Fix failing Balance test
rajivshah3 Oct 28, 2018
9039cd9
Mobile: Revert unintended changes
rajivshah3 Oct 28, 2018
8a83b20
Mobile: Re-add react-native-vector-icons patch
rajivshah3 Oct 28, 2018
00fcf8a
Remove unnecessary babel files/deps
rajivshah3 Oct 28, 2018
84301f7
Merge branch 'develop' into chore/rn-0.57
rajivshah3 Oct 31, 2018
6d75f42
Fix module-resolver, ignore some YellowBox warnings
rajivshah3 Nov 1, 2018
d9ff508
Merge branch 'develop' into chore/rn-0.57
rajivshah3 Nov 3, 2018
aee565f
Shared: Revert redux-persist upgrade
rajivshah3 Nov 3, 2018
71fc760
Make sure greenkeeper does not update redux-persist
rajivshah3 Nov 3, 2018
a014598
Shared: Revert React update
rajivshah3 Nov 3, 2018
a6bbbbb
Merge branch 'develop' into chore/rn-0.57
rajivshah3 Nov 4, 2018
3b5a8e7
Merge branch 'hotfix/revert-upgrade' into chore/rn-0.57
rajivshah3 Nov 4, 2018
08b2f9f
Revert "Merge branch 'hotfix/revert-upgrade' into chore/rn-0.57"
rajivshah3 Nov 5, 2018
70c9b3f
Merge branch 'develop' into chore/rn-0.57
rajivshah3 Nov 5, 2018
003381f
Merge branch 'develop' into chore/rn-0.57
rajivshah3 Nov 14, 2018
6bb336f
Mobile: Bump to React Native 0.57.5, React 16.6.1
rajivshah3 Nov 14, 2018
9cc9818
Revert unnecessary change [ci skip]
rajivshah3 Nov 19, 2018
a4ff569
Upgrade react-native-vector-icons
rajivshah3 Nov 21, 2018
0a457e6
Upgrade react-native-navigation
rajivshah3 Nov 21, 2018
9fa61f2
Use new Xcode build system
rajivshah3 Nov 21, 2018
b00df6c
Merge branch 'develop' into chore/rn-0.57
rajivshah3 Nov 21, 2018
a8398eb
Mobile: Fix Android build
rajivshah3 Nov 21, 2018
4bb2767
Merge branch 'develop' into chore/rn-0.57
rajivshah3 Nov 21, 2018
b791994
Mobile: Fix failing test
rajivshah3 Nov 21, 2018
4bfc028
Mobile: Revert RNN upgrade, revert to legacy build system
rajivshah3 Nov 21, 2018
ee4488c
Mobile: Cherry pick wix/react-native-navigation@ab2f335 for RN 0.57 s…
rajivshah3 Nov 21, 2018
a33f8db
Merge branch 'develop' into chore/rn-0.57
rajivshah3 Nov 24, 2018
7f4aa0f
Mobile: Fix typo in gradlew.bat
rajivshah3 Nov 27, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/mobile/.babelrc
@@ -1,9 +1,9 @@
{
"presets": ["react-native"],
"presets": ["module:metro-react-native-babel-preset"],
"plugins": [
["module-resolver", {
"root": [".", "src"],
"extensions": [".ios.js", ".android.js", ".js", ".json"]
"extensions": [".ios.js", ".android.js", ".js", ".json"],
}]
]
}
67 changes: 67 additions & 0 deletions src/mobile/.flowconfig
@@ -0,0 +1,67 @@
[ignore]
; We fork some components by platform
.*/*[.]android.js

; Ignore "BUCK" generated dirs
<PROJECT_ROOT>/\.buckd/

; Ignore unexpected extra "@providesModule"
.*/node_modules/.*/node_modules/fbjs/.*

; Ignore duplicate module providers
; For RN Apps installed via npm, "Libraries" folder is inside
; "node_modules/react-native" but in the source repo it is in the root
.*/Libraries/react-native/React.js

; Ignore polyfills
.*/Libraries/polyfills/.*

; Ignore metro
.*/node_modules/metro/.*

[include]

[libs]
node_modules/react-native/Libraries/react-native/react-native-interface.js
node_modules/react-native/flow/
node_modules/react-native/flow-github/

[options]
emoji=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

module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub'

module.file_ext=.js
module.file_ext=.jsx
module.file_ext=.json
module.file_ext=.native.js

suppress_type=$FlowIssue
suppress_type=$FlowFixMe
suppress_type=$FlowFixMeProps
suppress_type=$FlowFixMeState

suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError

[version]
^0.75.0
56 changes: 56 additions & 0 deletions src/mobile/.gitignore
@@ -0,0 +1,56 @@
# OSX
#
.DS_Store

# Xcode
#
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
*.xccheckout
*.moved-aside
DerivedData
*.hmap
*.ipa
*.xcuserstate
project.xcworkspace

# Android/IntelliJ
#
build/
.idea
.gradle
local.properties
*.iml

# node.js
#
node_modules/
npm-debug.log
yarn-error.log

# BUCK
buck-out/
\.buckd/
*.keystore

# fastlane
#
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
# screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://docs.fastlane.tools/best-practices/source-control/

*/fastlane/report.xml
*/fastlane/Preview.html
*/fastlane/screenshots

# Bundle artifact
*.jsbundle
4 changes: 2 additions & 2 deletions src/mobile/android/app/BUCK
Expand Up @@ -45,12 +45,12 @@ android_library(

android_build_config(
name = "build_config",
package = "trinity",
package = "com.trinity-mobile",
)

android_resource(
name = "res",
package = "trinity",
package = "com.trinity-mobile",
res = "src/main/res",
)

Expand Down
1 change: 0 additions & 1 deletion src/mobile/android/app/build.gradle
Expand Up @@ -176,7 +176,6 @@ dependencies {
implementation project(':react-native-navigation')
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:27.1.0'
implementation ('com.facebook.react:react-native:0.51.0') { force = true }
implementation project(':react-native-svg')
implementation project(':react-native-keychain')
implementation 'com.android.support:multidex:1.0.1'
Expand Down
1 change: 0 additions & 1 deletion src/mobile/android/gradle.properties
Expand Up @@ -10,7 +10,6 @@
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
# Default value: -Xmx10248m -XX:MaxPermSize=256m
org.gradle.jvmargs=-Xmx1536m
rajivshah3 marked this conversation as resolved.
Show resolved Hide resolved
# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8

# When configured, Gradle will run in incubating parallel mode.
Expand Down
Binary file modified src/mobile/android/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
@@ -1,4 +1,3 @@
#Mon May 14 13:15:29 BST 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
Expand Down
78 changes: 35 additions & 43 deletions src/mobile/android/gradlew
@@ -1,43 +1,25 @@
#!/usr/bin/env sh
#!/usr/bin/env bash

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

# 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
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""

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 @@ -48,7 +30,6 @@ die () {
cygwin=false
msys=false
darwin=false
nonstop=false
case "`uname`" in
CYGWIN* )
cygwin=true
Expand All @@ -59,11 +40,31 @@ 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 @@ -89,7 +90,7 @@ location of your Java installation."
fi

# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
Expand All @@ -113,7 +114,6 @@ 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,19 +154,11 @@ if $cygwin ; then
esac
fi

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

exec "$JAVACMD" "$@"
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
14 changes: 10 additions & 4 deletions src/mobile/android/gradlew.bat
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,9 +46,10 @@ echo location of your Java installation.
goto fail

:init
@rem Get command-line arguments, handling Windows variants
@rem Get command-line arguments, handling Windowz variants
rajivshah3 marked this conversation as resolved.
Show resolved Hide resolved

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 @@ -59,6 +60,11 @@ 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