Skip to content

Commit 91e00c5

Browse files
authored
chore: update example to RN 0.63 (#110)
1 parent 40405e7 commit 91e00c5

21 files changed

+596
-718
lines changed

.flowconfig

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ suppress_type=$FlowFixMe
4848
suppress_type=$FlowFixMeProps
4949
suppress_type=$FlowFixMeState
5050

51-
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)
52-
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)?:? #[0-9]+
53-
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
51+
well_formed_exports=true
52+
types_first=true
53+
experimental.abstract_locations=true
5454

5555
[lints]
5656
sketchy-null-number=warn
@@ -60,10 +60,10 @@ untyped-type-import=warn
6060
nonstrict-import=warn
6161
deprecated-type=warn
6262
unsafe-getters-setters=warn
63-
inexact-spread=warn
6463
unnecessary-invariant=warn
6564
signature-verification-failure=warn
6665
deprecated-utility=error
66+
unsafe-addition=error
6767

6868
[strict]
6969
deprecated-type
@@ -75,4 +75,4 @@ untyped-import
7575
untyped-type-import
7676

7777
[version]
78-
^0.113.0
78+
^0.129.0

example/android/app/build.gradle

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -164,13 +164,6 @@ android {
164164
}
165165
}
166166

167-
packagingOptions {
168-
pickFirst "lib/armeabi-v7a/libc++_shared.so"
169-
pickFirst "lib/arm64-v8a/libc++_shared.so"
170-
pickFirst "lib/x86/libc++_shared.so"
171-
pickFirst "lib/x86_64/libc++_shared.so"
172-
}
173-
174167
// applicationVariants are e.g. debug, release
175168
applicationVariants.all { variant ->
176169
variant.outputs.each { output ->

example/android/build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22

33
buildscript {
44
ext {
5-
buildToolsVersion = "28.0.3"
5+
buildToolsVersion = "29.0.2"
66
minSdkVersion = 16
7-
compileSdkVersion = 28
8-
targetSdkVersion = 28
7+
compileSdkVersion = 29
8+
targetSdkVersion = 29
99
}
1010
repositories {
1111
google()
1212
jcenter()
1313
}
1414
dependencies {
15-
classpath("com.android.tools.build:gradle:3.5.2")
15+
classpath("com.android.tools.build:gradle:3.5.3")
1616

1717
// NOTE: Do not place your application dependencies here; they belong
1818
// in the individual module build.gradle files

example/android/gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@
2020
android.useAndroidX=true
2121
android.enableJetifier=true
2222
# Version of flipper SDK to use with React Native
23-
FLIPPER_VERSION=0.33.1
23+
FLIPPER_VERSION=0.37.0
3.01 KB
Binary file not shown.
Lines changed: 1 addition & 1 deletion
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-6.0.1-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.2-all.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

example/android/gradlew

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -154,19 +154,19 @@ if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
154154
else
155155
eval `echo args$i`="\"$arg\""
156156
fi
157-
i=$((i+1))
157+
i=`expr $i + 1`
158158
done
159159
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" ;;
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" ;;
170170
esac
171171
fi
172172

@@ -175,14 +175,9 @@ save () {
175175
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
176176
echo " "
177177
}
178-
APP_ARGS=$(save "$@")
178+
APP_ARGS=`save "$@"`
179179

180180
# Collect all arguments for the java command, following the shell quoting and substitution rules
181181
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
182182

183-
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
184-
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
185-
cd "$(dirname "$0")"
186-
fi
187-
188183
exec "$JAVACMD" "$@"

example/android/gradlew.bat

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ if "%DIRNAME%" == "" set DIRNAME=.
2929
set APP_BASE_NAME=%~n0
3030
set APP_HOME=%DIRNAME%
3131

32+
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
33+
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
34+
3235
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
3336
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
3437

example/ios/Podfile

Lines changed: 5 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -1,106 +1,25 @@
1-
platform :ios, '9.0'
1+
require_relative '../../node_modules/react-native/scripts/react_native_pods'
22
require_relative '../../node_modules/@react-native-community/cli-platform-ios/native_modules'
33

4-
def add_flipper_pods!(versions = {})
5-
versions['Flipper'] ||= '~> 0.33.1'
6-
versions['DoubleConversion'] ||= '1.1.7'
7-
versions['Flipper-Folly'] ||= '~> 2.1'
8-
versions['Flipper-Glog'] ||= '0.3.6'
9-
versions['Flipper-PeerTalk'] ||= '~> 0.0.4'
10-
versions['Flipper-RSocket'] ||= '~> 1.0'
11-
12-
pod 'FlipperKit', versions['Flipper'], :configuration => 'Debug'
13-
pod 'FlipperKit/FlipperKitLayoutPlugin', versions['Flipper'], :configuration => 'Debug'
14-
pod 'FlipperKit/SKIOSNetworkPlugin', versions['Flipper'], :configuration => 'Debug'
15-
pod 'FlipperKit/FlipperKitUserDefaultsPlugin', versions['Flipper'], :configuration => 'Debug'
16-
pod 'FlipperKit/FlipperKitReactPlugin', versions['Flipper'], :configuration => 'Debug'
17-
18-
# List all transitive dependencies for FlipperKit pods
19-
# to avoid them being linked in Release builds
20-
pod 'Flipper', versions['Flipper'], :configuration => 'Debug'
21-
pod 'Flipper-DoubleConversion', versions['DoubleConversion'], :configuration => 'Debug'
22-
pod 'Flipper-Folly', versions['Flipper-Folly'], :configuration => 'Debug'
23-
pod 'Flipper-Glog', versions['Flipper-Glog'], :configuration => 'Debug'
24-
pod 'Flipper-PeerTalk', versions['Flipper-PeerTalk'], :configuration => 'Debug'
25-
pod 'Flipper-RSocket', versions['Flipper-RSocket'], :configuration => 'Debug'
26-
pod 'FlipperKit/Core', versions['Flipper'], :configuration => 'Debug'
27-
pod 'FlipperKit/CppBridge', versions['Flipper'], :configuration => 'Debug'
28-
pod 'FlipperKit/FBCxxFollyDynamicConvert', versions['Flipper'], :configuration => 'Debug'
29-
pod 'FlipperKit/FBDefines', versions['Flipper'], :configuration => 'Debug'
30-
pod 'FlipperKit/FKPortForwarding', versions['Flipper'], :configuration => 'Debug'
31-
pod 'FlipperKit/FlipperKitHighlightOverlay', versions['Flipper'], :configuration => 'Debug'
32-
pod 'FlipperKit/FlipperKitLayoutTextSearchable', versions['Flipper'], :configuration => 'Debug'
33-
pod 'FlipperKit/FlipperKitNetworkPlugin', versions['Flipper'], :configuration => 'Debug'
34-
end
35-
36-
# Post Install processing for Flipper
37-
def flipper_post_install(installer)
38-
installer.pods_project.targets.each do |target|
39-
if target.name == 'YogaKit'
40-
target.build_configurations.each do |config|
41-
config.build_settings['SWIFT_VERSION'] = '4.1'
42-
end
43-
end
44-
end
45-
end
4+
platform :ios, '10.0'
465

476
target 'example' do
487
pod 'react-native-segmented-control', :path => "../.."
8+
config = use_native_modules!
499

50-
# Pods for example
51-
pod 'FBLazyVector', :path => "../../node_modules/react-native/Libraries/FBLazyVector"
52-
pod 'FBReactNativeSpec', :path => "../../node_modules/react-native/Libraries/FBReactNativeSpec"
53-
pod 'RCTRequired', :path => "../../node_modules/react-native/Libraries/RCTRequired"
54-
pod 'RCTTypeSafety', :path => "../../node_modules/react-native/Libraries/TypeSafety"
55-
pod 'React', :path => '../../node_modules/react-native/'
56-
pod 'React-Core', :path => '../../node_modules/react-native/'
57-
pod 'React-CoreModules', :path => '../../node_modules/react-native/React/CoreModules'
58-
pod 'React-Core/DevSupport', :path => '../../node_modules/react-native/'
59-
pod 'React-RCTActionSheet', :path => '../../node_modules/react-native/Libraries/ActionSheetIOS'
60-
pod 'React-RCTAnimation', :path => '../../node_modules/react-native/Libraries/NativeAnimation'
61-
pod 'React-RCTBlob', :path => '../../node_modules/react-native/Libraries/Blob'
62-
pod 'React-RCTImage', :path => '../../node_modules/react-native/Libraries/Image'
63-
pod 'React-RCTLinking', :path => '../../node_modules/react-native/Libraries/LinkingIOS'
64-
pod 'React-RCTNetwork', :path => '../../node_modules/react-native/Libraries/Network'
65-
pod 'React-RCTSettings', :path => '../../node_modules/react-native/Libraries/Settings'
66-
pod 'React-RCTText', :path => '../../node_modules/react-native/Libraries/Text'
67-
pod 'React-RCTVibration', :path => '../../node_modules/react-native/Libraries/Vibration'
68-
pod 'React-Core/RCTWebSocket', :path => '../../node_modules/react-native/'
69-
70-
pod 'React-cxxreact', :path => '../../node_modules/react-native/ReactCommon/cxxreact'
71-
pod 'React-jsi', :path => '../../node_modules/react-native/ReactCommon/jsi'
72-
pod 'React-jsiexecutor', :path => '../../node_modules/react-native/ReactCommon/jsiexecutor'
73-
pod 'React-jsinspector', :path => '../../node_modules/react-native/ReactCommon/jsinspector'
74-
pod 'ReactCommon/callinvoker', :path => "../../node_modules/react-native/ReactCommon"
75-
pod 'ReactCommon/turbomodule/core', :path => "../../node_modules/react-native/ReactCommon"
76-
pod 'Yoga', :path => '../../node_modules/react-native/ReactCommon/yoga', :modular_headers => true
77-
78-
pod 'DoubleConversion', :podspec => '../../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
79-
pod 'glog', :podspec => '../../node_modules/react-native/third-party-podspecs/glog.podspec'
80-
pod 'Folly', :podspec => '../../node_modules/react-native/third-party-podspecs/Folly.podspec'
10+
use_react_native!(:path => '../../node_modules/react-native')
8111

8212
target 'exampleTests' do
8313
inherit! :complete
8414
# Pods for testing
8515
end
8616

87-
use_native_modules!
88-
8917
# Enables Flipper.
9018
#
9119
# Note that if you have use_frameworks! enabled, Flipper will not work and
9220
# you should disable these next few lines.
93-
add_flipper_pods!
21+
use_flipper!
9422
post_install do |installer|
9523
flipper_post_install(installer)
9624
end
9725
end
98-
99-
target 'example-tvOS' do
100-
# Pods for example-tvOS
101-
102-
target 'example-tvOSTests' do
103-
inherit! :search_paths
104-
# Pods for testing
105-
end
106-
end

0 commit comments

Comments
 (0)