Skip to content

Commit 78735f2

Browse files
committed
Merge branch 'refs/heads/rn-upgrade-0.64.2'
# Conflicts: # android/gradlew.bat
2 parents e4c21b2 + f91d3af commit 78735f2

File tree

111 files changed

+5425
-4758
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

111 files changed

+5425
-4758
lines changed

.flowconfig

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,6 @@
88
; Ignore polyfills
99
node_modules/react-native/Libraries/polyfills/.*
1010

11-
; These should not be required directly
12-
; require from fbjs/lib instead: require('fbjs/lib/warning')
13-
node_modules/warning/.*
14-
1511
; Flow doesn't support platforms
1612
.*/Libraries/Utilities/LoadingView.js
1713

@@ -30,6 +26,8 @@ emoji=true
3026
esproposal.optional_chaining=enable
3127
esproposal.nullish_coalescing=enable
3228

29+
exact_by_default=true
30+
3331
module.file_ext=.js
3432
module.file_ext=.json
3533
module.file_ext=.ios.js
@@ -44,10 +42,6 @@ suppress_type=$FlowFixMe
4442
suppress_type=$FlowFixMeProps
4543
suppress_type=$FlowFixMeState
4644

47-
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)
48-
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)?:? #[0-9]+
49-
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
50-
5145
[lints]
5246
sketchy-null-number=warn
5347
sketchy-null-mixed=warn
@@ -56,10 +50,8 @@ untyped-type-import=warn
5650
nonstrict-import=warn
5751
deprecated-type=warn
5852
unsafe-getters-setters=warn
59-
inexact-spread=warn
6053
unnecessary-invariant=warn
6154
signature-verification-failure=warn
62-
deprecated-utility=error
6355

6456
[strict]
6557
deprecated-type
@@ -71,4 +63,4 @@ untyped-import
7163
untyped-type-import
7264

7365
[version]
74-
^0.113.0
66+
^0.137.0

.gitattributes

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
# specific for windows script files
1+
# Windows files should use crlf line endings
2+
# https://help.github.com/articles/dealing-with-line-endings/
23
*.bat text eol=crlf

.prettierrc.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ module.exports = {
33
jsxBracketSameLine: true,
44
singleQuote: true,
55
trailingComma: 'all',
6+
arrowParens: 'avoid',
67
};

_editorconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Windows files
2+
[*.bat]
3+
end_of_line = crlf

android/app/build.gradle

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import com.android.build.OutputFile
2020
* // default. Can be overridden with ENTRY_FILE environment variable.
2121
* entryFile: "index.android.js",
2222
*
23-
* // https://facebook.github.io/react-native/docs/performance#enable-the-ram-format
23+
* // https://reactnative.dev/docs/performance#enable-the-ram-format
2424
* bundleCommand: "ram-bundle",
2525
*
2626
* // whether to bundle JS and assets in debug mode
@@ -120,6 +120,8 @@ def jscFlavor = 'org.webkit:android-jsc:+'
120120
def enableHermes = project.ext.react.get("enableHermes", false);
121121

122122
android {
123+
ndkVersion rootProject.ext.ndkVersion
124+
123125
compileSdkVersion rootProject.ext.compileSdkVersion
124126
buildToolsVersion rootProject.ext.buildToolsVersion
125127

@@ -160,7 +162,7 @@ android {
160162
}
161163
release {
162164
// Caution! In production, you need to generate your own keystore file.
163-
// see https://facebook.github.io/react-native/docs/signed-apk-android.
165+
// see https://reactnative.dev/docs/signed-apk-android.
164166
signingConfig signingConfigs.debug
165167
minifyEnabled enableProguardInReleaseBuilds
166168
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
@@ -178,13 +180,13 @@ android {
178180
applicationVariants.all { variant ->
179181
variant.outputs.each { output ->
180182
// For each separate APK per architecture, set a unique version code as described here:
181-
182183
// https://developer.android.com/studio/build/configure-apk-splits.html
184+
// Example: versionCode 1 will generate 1001 for armeabi-v7a, 1002 for x86, etc.
183185
def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4]
184186
def abi = output.getFilter(OutputFile.ABI)
185187
if (abi != null) { // null for the universal-debug, universal-release variants
186188
output.versionCodeOverride =
187-
versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
189+
defaultConfig.versionCode * 1000 + versionCodes.get(abi)
188190
}
189191

190192
}
@@ -203,6 +205,7 @@ dependencies {
203205
}
204206
debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
205207
exclude group:'com.facebook.flipper'
208+
exclude group:'com.squareup.okhttp3', module:'okhttp'
206209
}
207210
debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}") {
208211
exclude group:'com.facebook.flipper'

android/app/src/debug/AndroidManifest.xml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,10 @@
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
33
xmlns:tools="http://schemas.android.com/tools">
44
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
5-
<application android:usesCleartextTraffic="true" tools:targetApi="28" tools:ignore="GoogleAppIndexingWarning" />
5+
<application
6+
android:usesCleartextTraffic="true"
7+
tools:targetApi="28"
8+
tools:ignore="GoogleAppIndexingWarning">
9+
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
10+
</application>
611
</manifest>

android/app/src/main/AndroidManifest.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
<category android:name="android.intent.category.LAUNCHER" />
2323
</intent-filter>
2424
</activity>
25-
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
2625
</application>
2726

2827
</manifest>

android/app/src/main/res/values/styles.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<resources>
22

33
<!-- Base application theme. -->
4-
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
4+
<style name="AppTheme" parent="Theme.AppCompat.DayNight.NoActionBar">
55
<!-- Customize your theme here. -->
66
<item name="android:textColor">#000000</item>
77
</style>

android/build.gradle

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
// Top-level build file where you can add configuration options common to all sub-projects/modules.
22

33
buildscript {
4+
ext {
5+
buildToolsVersion = "29.0.3"
6+
minSdkVersion = 21
7+
compileSdkVersion = 29
8+
targetSdkVersion = 29
9+
ndkVersion = "20.1.5948944"
10+
supportLibVersion = "29.0.3"
11+
}
12+
413
repositories {
514
jcenter()
615
maven {
@@ -9,7 +18,7 @@ buildscript {
918
}
1019
}
1120
dependencies {
12-
classpath("com.android.tools.build:gradle:3.5.2")
21+
classpath("com.android.tools.build:gradle:4.1.0")
1322

1423
// NOTE: Do not place your application dependencies here; they belong
1524
// in the individual module build.gradle files
@@ -38,10 +47,3 @@ allprojects {
3847
}
3948
}
4049

41-
ext {
42-
buildToolsVersion = "28.0.3"
43-
minSdkVersion = 16
44-
compileSdkVersion = 28
45-
targetSdkVersion = 28
46-
supportLibVersion = "26.1.0"
47-
}

android/gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ android.useAndroidX=true
2424
# Automatically convert third-party libraries to use AndroidX
2525
android.enableJetifier=true
2626
# Version of flipper SDK to use with React Native
27-
FLIPPER_VERSION=0.33.1
27+
FLIPPER_VERSION=0.75.1
6.77 KB
Binary file not shown.

android/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
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-6.0.1-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip

android/gradlew

Lines changed: 51 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env bash
1+
#!/usr/bin/env sh
22

33
#
44
# Copyright 2015 the original author or authors.
@@ -22,20 +22,38 @@
2222
##
2323
##############################################################################
2424

25-
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
26-
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
25+
# Attempt to set APP_HOME
26+
# Resolve links: $0 may be a link
27+
PRG="$0"
28+
# Need this for relative symlinks.
29+
while [ -h "$PRG" ] ; do
30+
ls=`ls -ld "$PRG"`
31+
link=`expr "$ls" : '.*-> \(.*\)$'`
32+
if expr "$link" : '/.*' > /dev/null; then
33+
PRG="$link"
34+
else
35+
PRG=`dirname "$PRG"`"/$link"
36+
fi
37+
done
38+
SAVED="`pwd`"
39+
cd "`dirname \"$PRG\"`/" >/dev/null
40+
APP_HOME="`pwd -P`"
41+
cd "$SAVED" >/dev/null
2742

2843
APP_NAME="Gradle"
2944
APP_BASE_NAME=`basename "$0"`
3045

46+
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
47+
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
48+
3149
# Use the maximum available, or set MAX_FD != -1 to use that value.
3250
MAX_FD="maximum"
3351

34-
warn ( ) {
52+
warn () {
3553
echo "$*"
3654
}
3755

38-
die ( ) {
56+
die () {
3957
echo
4058
echo "$*"
4159
echo
@@ -46,6 +64,7 @@ die ( ) {
4664
cygwin=false
4765
msys=false
4866
darwin=false
67+
nonstop=false
4968
case "`uname`" in
5069
CYGWIN* )
5170
cygwin=true
@@ -56,33 +75,14 @@ case "`uname`" in
5675
MINGW* )
5776
msys=true
5877
;;
78+
NONSTOP* )
79+
nonstop=true
80+
;;
5981
esac
6082

61-
# For Cygwin, ensure paths are in UNIX format before anything is touched.
62-
if $cygwin ; then
63-
[ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
64-
fi
65-
66-
# Attempt to set APP_HOME
67-
# Resolve links: $0 may be a link
68-
PRG="$0"
69-
# Need this for relative symlinks.
70-
while [ -h "$PRG" ] ; do
71-
ls=`ls -ld "$PRG"`
72-
link=`expr "$ls" : '.*-> \(.*\)$'`
73-
if expr "$link" : '/.*' > /dev/null; then
74-
PRG="$link"
75-
else
76-
PRG=`dirname "$PRG"`"/$link"
77-
fi
78-
done
79-
SAVED="`pwd`"
80-
cd "`dirname \"$PRG\"`/" >&-
81-
APP_HOME="`pwd -P`"
82-
cd "$SAVED" >&-
83-
8483
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
8584

85+
8686
# Determine the Java command to use to start the JVM.
8787
if [ -n "$JAVA_HOME" ] ; then
8888
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
@@ -106,7 +106,7 @@ location of your Java installation."
106106
fi
107107

108108
# Increase the maximum file descriptors if we can.
109-
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
109+
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
110110
MAX_FD_LIMIT=`ulimit -H -n`
111111
if [ $? -eq 0 ] ; then
112112
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
@@ -131,6 +131,8 @@ if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
131131
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
132132
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
133133

134+
JAVACMD=`cygpath --unix "$JAVACMD"`
135+
134136
# We build the pattern for arguments to be converted via cygpath
135137
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
136138
SEP=""
@@ -154,27 +156,30 @@ if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
154156
else
155157
eval `echo args$i`="\"$arg\""
156158
fi
157-
i=$((i+1))
159+
i=`expr $i + 1`
158160
done
159161
case $i in
160-
(0) set -- ;;
161-
(1) set -- "$args0" ;;
162-
(2) set -- "$args0" "$args1" ;;
163-
(3) set -- "$args0" "$args1" "$args2" ;;
164-
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
165-
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
166-
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
167-
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
168-
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
169-
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
162+
0) set -- ;;
163+
1) set -- "$args0" ;;
164+
2) set -- "$args0" "$args1" ;;
165+
3) set -- "$args0" "$args1" "$args2" ;;
166+
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
167+
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
168+
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
169+
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
170+
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
171+
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
170172
esac
171173
fi
172174

173-
# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
174-
function splitJvmOpts() {
175-
JVM_OPTS=("$@")
175+
# Escape application args
176+
save () {
177+
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
178+
echo " "
176179
}
177-
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
178-
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
180+
APP_ARGS=`save "$@"`
181+
182+
# Collect all arguments for the java command, following the shell quoting and substitution rules
183+
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
179184

180-
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
185+
exec "$JAVACMD" "$@"

0 commit comments

Comments
 (0)