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

Lines changed: 17 additions & 1 deletion
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

Lines changed: 3 additions & 0 deletions
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

Lines changed: 4 additions & 15 deletions
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

Lines changed: 12 additions & 12 deletions
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

Lines changed: 17 additions & 0 deletions
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

Lines changed: 0 additions & 53 deletions
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.**
Lines changed: 6 additions & 0 deletions
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

Lines changed: 10 additions & 1 deletion
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

Lines changed: 0 additions & 2 deletions
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.

0 commit comments

Comments
 (0)