Skip to content

Commit 41e684d

Browse files
committed
chore: upgrade to [email protected] by rn-diff-purge
1 parent 6427433 commit 41e684d

21 files changed

+200
-172
lines changed

.flowconfig

+17-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,23 @@ module.system.node.resolve_dirname=src
3232
module.name_mapper='^package.json$' -> '<PROJECT_ROOT>/package.json'
3333
emoji=true
3434

35+
esproposal.optional_chaining=enable
36+
esproposal.nullish_coalescing=enable
37+
3538
module.system=haste
39+
module.system.haste.use_name_reducers=true
40+
# get basename
41+
module.system.haste.name_reducers='^.*/\([a-zA-Z0-9$_.-]+\.js\(\.flow\)?\)$' -> '\1'
42+
# strip .js or .js.flow suffix
43+
module.system.haste.name_reducers='^\(.*\)\.js\(\.flow\)?$' -> '\1'
44+
# strip .ios suffix
45+
module.system.haste.name_reducers='^\(.*\)\.ios$' -> '\1'
46+
module.system.haste.name_reducers='^\(.*\)\.android$' -> '\1'
47+
module.system.haste.name_reducers='^\(.*\)\.native$' -> '\1'
48+
module.system.haste.paths.blacklist=.*/__tests__/.*
49+
module.system.haste.paths.blacklist=.*/__mocks__/.*
50+
module.system.haste.paths.blacklist=<PROJECT_ROOT>/node_modules/react-native/Libraries/Animated/src/polyfills/.*
51+
module.system.haste.paths.whitelist=<PROJECT_ROOT>/node_modules/react-native/Libraries/.*
3652

3753
munge_underscores=true
3854

@@ -53,4 +69,4 @@ suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(<VERSION>\\)? *\\(site=[a-z,_]*
5369
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
5470

5571
[version]
56-
^0.65.0
72+
^0.92.0

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -65,3 +65,6 @@ haste-map-react-native-packager*
6565
.idea
6666

6767
coverage
68+
69+
# Bundle artifact
70+
*.jsbundle

android/app/BUCK

+4-15
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,11 @@ import re
1010
# - `buck install -r android/app` - compile, install and run application
1111
#
1212

13-
lib_deps = []
14-
for jarfile in glob(['libs/*.jar']):
15-
name = 'jars__' + re.sub(r'^.*/([^/]+)\.jar$', r'\1', jarfile)
16-
lib_deps.append(':' + name)
17-
prebuilt_jar(
18-
name = name,
19-
binary_jar = jarfile,
20-
)
13+
load(":build_defs.bzl", "create_aar_targets", "create_jar_targets")
2114

22-
for aarfile in glob(['libs/*.aar']):
23-
name = 'aars__' + re.sub(r'^.*/([^/]+)\.aar$', r'\1', aarfile)
24-
lib_deps.append(':' + name)
25-
android_prebuilt_aar(
26-
name = name,
27-
aar = aarfile,
28-
)
15+
lib_deps = []
16+
create_aar_targets(glob(["libs/*.aar"]))
17+
create_jar_targets(glob(["libs/*.jar"]))
2918

3019
android_library(
3120
name = 'all-libs',

android/app/build.gradle

+12-12
Original file line numberDiff line numberDiff line change
@@ -105,25 +105,25 @@ def enableSeparateBuildPerCPUArchitecture = false
105105
def enableProguardInReleaseBuilds = false
106106

107107
android {
108-
compileSdkVersion 26
109-
buildToolsVersion "26.0.1"
108+
compileSdkVersion rootProject.ext.compileSdkVersion
109+
compileOptions {
110+
sourceCompatibility JavaVersion.VERSION_1_8
111+
targetCompatibility JavaVersion.VERSION_1_8
112+
}
110113

111114
defaultConfig {
112115
applicationId "com.gitpoint"
113-
minSdkVersion 16
114-
targetSdkVersion 26
116+
minSdkVersion rootProject.ext.minSdkVersion
117+
targetSdkVersion rootProject.ext.targetSdkVersion
115118
versionCode 10
116119
versionName "1.7.1"
117-
ndk {
118-
abiFilters "armeabi-v7a", "x86"
119-
}
120120
}
121121
splits {
122122
abi {
123123
reset()
124124
enable enableSeparateBuildPerCPUArchitecture
125125
universalApk false // If true, also generate a universal APK
126-
include "armeabi-v7a", "x86"
126+
include "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
127127
}
128128
}
129129
buildTypes {
@@ -137,7 +137,7 @@ android {
137137
variant.outputs.each { output ->
138138
// For each separate APK per architecture, set a unique version code as described here:
139139
// http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
140-
def versionCodes = ["armeabi-v7a":1, "x86":2]
140+
def versionCodes = ["armeabi-v7a":1, "x86":2, "arm64-v8a": 3, "x86_64": 4]
141141
def abi = output.getFilter(OutputFile.ABI)
142142
if (abi != null) { // null for the universal-debug, universal-release variants
143143
output.versionCodeOverride =
@@ -157,9 +157,9 @@ dependencies {
157157
compile project(':react-native-config')
158158
compile project(':react-native-code-push')
159159
compile project(':react-native-device-info')
160-
compile fileTree(dir: "libs", include: ["*.jar"])
161-
compile "com.android.support:appcompat-v7:23.0.1"
162-
compile "com.facebook.react:react-native:+" // From node_modules
160+
implementation fileTree(dir: "libs", include: ["*.jar"])
161+
implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
162+
implementation "com.facebook.react:react-native:+" // From node_modules
163163
compile "com.facebook.fresco:animated-gif:1.3.0"
164164
}
165165

android/app/build_defs.bzl

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
"""Helper definitions to glob .aar and .jar targets"""
2+
def create_aar_targets(aarfiles):
3+
for aarfile in aarfiles:
4+
name = "aars__" + aarfile[aarfile.rindex("/") + 1:aarfile.rindex(".aar")]
5+
lib_deps.append(":" + name)
6+
android_prebuilt_aar(
7+
name = name,
8+
aar = aarfile,
9+
)
10+
def create_jar_targets(jarfiles):
11+
for jarfile in jarfiles:
12+
name = "jars__" + jarfile[jarfile.rindex("/") + 1:jarfile.rindex(".jar")]
13+
lib_deps.append(":" + name)
14+
prebuilt_jar(
15+
name = name,
16+
binary_jar = jarfile,
17+
)

android/app/proguard-rules.pro

-53
Original file line numberDiff line numberDiff line change
@@ -15,56 +15,3 @@
1515
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
1616
# public *;
1717
#}
18-
19-
# Disabling obfuscation is useful if you collect stack traces from production crashes
20-
# (unless you are using a system that supports de-obfuscate the stack traces).
21-
-dontobfuscate
22-
23-
# React Native
24-
25-
# Keep our interfaces so they can be used by other ProGuard rules.
26-
# See http://sourceforge.net/p/proguard/bugs/466/
27-
-keep,allowobfuscation @interface com.facebook.proguard.annotations.DoNotStrip
28-
-keep,allowobfuscation @interface com.facebook.proguard.annotations.KeepGettersAndSetters
29-
-keep,allowobfuscation @interface com.facebook.common.internal.DoNotStrip
30-
31-
# Do not strip any method/class that is annotated with @DoNotStrip
32-
-keep @com.facebook.proguard.annotations.DoNotStrip class *
33-
-keep @com.facebook.common.internal.DoNotStrip class *
34-
-keepclassmembers class * {
35-
@com.facebook.proguard.annotations.DoNotStrip *;
36-
@com.facebook.common.internal.DoNotStrip *;
37-
}
38-
39-
-keepclassmembers @com.facebook.proguard.annotations.KeepGettersAndSetters class * {
40-
void set*(***);
41-
*** get*();
42-
}
43-
44-
-keep class * extends com.facebook.react.bridge.JavaScriptModule { *; }
45-
-keep class * extends com.facebook.react.bridge.NativeModule { *; }
46-
-keepclassmembers,includedescriptorclasses class * { native <methods>; }
47-
-keepclassmembers class * { @com.facebook.react.uimanager.UIProp <fields>; }
48-
-keepclassmembers class * { @com.facebook.react.uimanager.annotations.ReactProp <methods>; }
49-
-keepclassmembers class * { @com.facebook.react.uimanager.annotations.ReactPropGroup <methods>; }
50-
51-
-dontwarn com.facebook.react.**
52-
53-
# TextLayoutBuilder uses a non-public Android constructor within StaticLayout.
54-
# See libs/proxy/src/main/java/com/facebook/fbui/textlayoutbuilder/proxy for details.
55-
-dontwarn android.text.StaticLayout
56-
57-
# okhttp
58-
59-
-keepattributes Signature
60-
-keepattributes *Annotation*
61-
-keep class okhttp3.** { *; }
62-
-keep interface okhttp3.** { *; }
63-
-dontwarn okhttp3.**
64-
65-
# okio
66-
67-
-keep class sun.misc.Unsafe { *; }
68-
-dontwarn java.nio.file.*
69-
-dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
70-
-dontwarn okio.**
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
xmlns:tools="http://schemas.android.com/tools">
4+
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
5+
<application android:usesCleartextTraffic="true" tools:targetApi="28" tools:ignore="GoogleAppIndexingWarning" />
6+
</manifest>

android/build.gradle

+10-1
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,19 @@
11
// Top-level build file where you can add configuration options common to all sub-projects/modules.
22

33
buildscript {
4+
ext {
5+
buildToolsVersion = "28.0.3"
6+
minSdkVersion = 16
7+
compileSdkVersion = 28
8+
targetSdkVersion = 28
9+
supportLibVersion = "28.0.0"
10+
}
411
repositories {
12+
google()
513
jcenter()
614
}
715
dependencies {
8-
classpath 'com.android.tools.build:gradle:2.2.3'
16+
classpath("com.android.tools.build:gradle:3.4.0")
917

1018
// NOTE: Do not place your application dependencies here; they belong
1119
// in the individual module build.gradle files
@@ -15,6 +23,7 @@ buildscript {
1523
allprojects {
1624
repositories {
1725
mavenLocal()
26+
google()
1827
jcenter()
1928
maven {
2029
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm

android/gradle.properties

-2
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,3 @@
1616
# This option should only be used with decoupled projects. More details, visit
1717
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
1818
# org.gradle.parallel=true
19-
20-
android.useDeprecatedNdk=true
3.27 KB
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
34
zipStoreBase=GRADLE_USER_HOME
45
zipStorePath=wrapper/dists
5-
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip

android/gradlew

+56-35
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,58 @@
1-
#!/usr/bin/env bash
1+
#!/usr/bin/env sh
2+
#
3+
# Copyright 2015 the original author or authors.
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
217

318
##############################################################################
419
##
520
## Gradle start up script for UN*X
621
##
722
##############################################################################
823

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

1242
APP_NAME="Gradle"
1343
APP_BASE_NAME=`basename "$0"`
1444

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

18-
warn ( ) {
51+
warn () {
1952
echo "$*"
2053
}
2154

22-
die ( ) {
55+
die () {
2356
echo
2457
echo "$*"
2558
echo
@@ -30,6 +63,7 @@ die ( ) {
3063
cygwin=false
3164
msys=false
3265
darwin=false
66+
nonstop=false
3367
case "`uname`" in
3468
CYGWIN* )
3569
cygwin=true
@@ -40,31 +74,11 @@ case "`uname`" in
4074
MINGW* )
4175
msys=true
4276
;;
77+
NONSTOP* )
78+
nonstop=true
79+
;;
4380
esac
4481

45-
# For Cygwin, ensure paths are in UNIX format before anything is touched.
46-
if $cygwin ; then
47-
[ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
48-
fi
49-
50-
# Attempt to set APP_HOME
51-
# Resolve links: $0 may be a link
52-
PRG="$0"
53-
# Need this for relative symlinks.
54-
while [ -h "$PRG" ] ; do
55-
ls=`ls -ld "$PRG"`
56-
link=`expr "$ls" : '.*-> \(.*\)$'`
57-
if expr "$link" : '/.*' > /dev/null; then
58-
PRG="$link"
59-
else
60-
PRG=`dirname "$PRG"`"/$link"
61-
fi
62-
done
63-
SAVED="`pwd`"
64-
cd "`dirname \"$PRG\"`/" >&-
65-
APP_HOME="`pwd -P`"
66-
cd "$SAVED" >&-
67-
6882
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
6983

7084
# Determine the Java command to use to start the JVM.
@@ -90,7 +104,7 @@ location of your Java installation."
90104
fi
91105

92106
# Increase the maximum file descriptors if we can.
93-
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
107+
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
94108
MAX_FD_LIMIT=`ulimit -H -n`
95109
if [ $? -eq 0 ] ; then
96110
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
@@ -114,6 +128,7 @@ fi
114128
if $cygwin ; then
115129
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
116130
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
131+
JAVACMD=`cygpath --unix "$JAVACMD"`
117132

118133
# We build the pattern for arguments to be converted via cygpath
119134
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
@@ -154,11 +169,17 @@ if $cygwin ; then
154169
esac
155170
fi
156171

157-
# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
158-
function splitJvmOpts() {
159-
JVM_OPTS=("$@")
172+
# Escape application args
173+
save () {
174+
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
175+
echo " "
160176
}
161-
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
162-
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
177+
APP_ARGS=$(save "$@")
178+
# Collect all arguments for the java command, following the shell quoting and substitution rules
179+
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
180+
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
181+
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
182+
cd "$(dirname "$0")"
183+
fi
163184

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

0 commit comments

Comments
 (0)