Skip to content
This repository was archived by the owner on Jan 3, 2024. It is now read-only.

Commit 98583fe

Browse files
committed
[1.1.0] Upgrade example to RN 0.57.0
1 parent e1830d3 commit 98583fe

31 files changed

+142
-167
lines changed

.tipsirc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export default {
4242
},
4343

4444
// Default value — 1
45-
runTestsCount: 5,
45+
runTestsCount: 30,
4646

4747
// Default value — true
4848
failFast: false,

.travis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ matrix:
22
include:
33
- os: osx
44
language: objective-c
5-
osx_image: xcode9.1
5+
osx_image: xcode9.4
66
env:
77
- OS: 'ios'
88

@@ -14,9 +14,9 @@ matrix:
1414
components:
1515
- platform-tools
1616
- tools
17-
- build-tools-26.0.2
17+
- build-tools-27.0.3
1818
- android-21
19-
- android-26
19+
- android-27
2020
- sys-img-armeabi-v7a-android-21
2121
- extra-android-m2repository
2222
- extra-google-m2repository

README.md

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ matrix:
4747
include:
4848
- os: osx
4949
language: objective-c
50-
osx_image: xcode9.1
50+
osx_image: xcode9.4
5151
env:
5252
- OS: 'ios'
5353

@@ -59,9 +59,9 @@ matrix:
5959
components:
6060
- platform-tools
6161
- tools
62-
- build-tools-26.0.2
62+
- build-tools-27.0.3
6363
- android-21
64-
- android-26
64+
- android-27
6565
- sys-img-armeabi-v7a-android-21
6666
- extra-android-m2repository
6767
- extra-google-m2repository
@@ -94,10 +94,6 @@ script:
9494
```
9595
9696
**.travis.yml** — is a config for Travis CI. It contains a matrix with jobs for iOS and Android.
97-
* [Travis does not support x86 Android emulators.](https://github.com/facebook/react-native/issues/21037)
98-
* That's why we can't use the latest version of RN.
99-
* Currently the maximum possible version of RN is 0.48.4.
100-
* This version requires Xcode 9.1.
10197
* `sys-img-armeabi-v7a-android-21` is an Emulator image with Android SDK 21 on board.
10298
* This is an ARM image because we can't use x86 Emulators.
10399
* Another parts of Android components just contains required parts to build an Android App.
@@ -239,7 +235,6 @@ export default {
239235
* Add bin scripts
240236
* Create a npx command to bootstrap new modules with example apps and tests from CLI
241237
* Add podspec generator
242-
* Track [21037](https://github.com/facebook/react-native/issues/21037) issue on RN and upgrade example to the latest RN if it will possible
243238
* Use passed fields to config `additionalVariablesToBuild`, `build`, `additionalVariablesToTest`
244239

245240
## License

example/.babelrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"presets": ["react-native"]
2+
"presets": ["module:metro-react-native-babel-preset"]
33
}

example/.flowconfig

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,23 @@ node_modules/react-native/flow-github/
2929
[options]
3030
emoji=true
3131

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

3450
munge_underscores=true
3551

@@ -51,4 +67,4 @@ suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
5167
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
5268

5369
[version]
54-
^0.67.0
70+
^0.78.0

example/android/app/build.gradle

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,10 @@ import com.android.build.OutputFile
7272
* ]
7373
*/
7474

75+
project.ext.react = [
76+
entryFile: "index.js"
77+
]
78+
7579
apply from: "../../node_modules/react-native/react.gradle"
7680

7781
/**
@@ -90,13 +94,13 @@ def enableSeparateBuildPerCPUArchitecture = false
9094
def enableProguardInReleaseBuilds = false
9195

9296
android {
93-
compileSdkVersion 26
94-
buildToolsVersion "26.0.2"
97+
compileSdkVersion rootProject.ext.compileSdkVersion
98+
buildToolsVersion rootProject.ext.buildToolsVersion
9599

96100
defaultConfig {
97101
applicationId "com.example"
98-
minSdkVersion 16
99-
targetSdkVersion 26
102+
minSdkVersion rootProject.ext.minSdkVersion
103+
targetSdkVersion rootProject.ext.targetSdkVersion
100104
versionCode 1
101105
versionName "1.0"
102106
ndk {
@@ -145,7 +149,7 @@ dependencies {
145149
implementation project(':tipsi-camera-roll')
146150
implementation project(':react-native-fs')
147151
implementation fileTree(dir: "libs", include: ["*.jar"])
148-
implementation "com.android.support:appcompat-v7:23.0.1"
152+
implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
149153
implementation "com.facebook.react:react-native:+" // From node_modules
150154
}
151155

example/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.**
-362 Bytes
Loading
4.91 KB
Loading
-110 Bytes
Loading

0 commit comments

Comments
 (0)