Skip to content

Commit 28bbff0

Browse files
authored
Update example app to RN 0.74.2 (#320)
1 parent 7bd62fd commit 28bbff0

File tree

20 files changed

+2037
-855
lines changed

20 files changed

+2037
-855
lines changed

.gitignore

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ DerivedData
2222
*.hmap
2323
*.ipa
2424
*.xcuserstate
25-
2625
# Android/IntelliJ
2726
build/
2827
.idea
@@ -56,3 +55,11 @@ android/keystores/debug.keystore
5655

5756
# testing
5857
/coverage
58+
59+
# Yarn
60+
.yarn/*
61+
!.yarn/patches
62+
!.yarn/plugins
63+
!.yarn/releases
64+
!.yarn/sdks
65+
!.yarn/versions

example/Gemfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
source 'https://rubygems.org'
2+
3+
# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
4+
ruby ">= 2.6.10"
5+
6+
# Cocoapods 1.15 introduced a bug which break the build. We will remove the upper
7+
# bound in the template on Cocoapods with next React Native release.
8+
gem 'cocoapods', '>= 1.13', '< 1.15'

example/Gemfile.lock

Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
GEM
2+
remote: https://rubygems.org/
3+
specs:
4+
CFPropertyList (3.0.7)
5+
base64
6+
nkf
7+
rexml
8+
activesupport (7.1.3.4)
9+
base64
10+
bigdecimal
11+
concurrent-ruby (~> 1.0, >= 1.0.2)
12+
connection_pool (>= 2.2.5)
13+
drb
14+
i18n (>= 1.6, < 2)
15+
minitest (>= 5.1)
16+
mutex_m
17+
tzinfo (~> 2.0)
18+
addressable (2.8.6)
19+
public_suffix (>= 2.0.2, < 6.0)
20+
algoliasearch (1.27.5)
21+
httpclient (~> 2.8, >= 2.8.3)
22+
json (>= 1.5.1)
23+
atomos (0.1.3)
24+
base64 (0.2.0)
25+
bigdecimal (3.1.8)
26+
claide (1.1.0)
27+
cocoapods (1.14.3)
28+
addressable (~> 2.8)
29+
claide (>= 1.0.2, < 2.0)
30+
cocoapods-core (= 1.14.3)
31+
cocoapods-deintegrate (>= 1.0.3, < 2.0)
32+
cocoapods-downloader (>= 2.1, < 3.0)
33+
cocoapods-plugins (>= 1.0.0, < 2.0)
34+
cocoapods-search (>= 1.0.0, < 2.0)
35+
cocoapods-trunk (>= 1.6.0, < 2.0)
36+
cocoapods-try (>= 1.1.0, < 2.0)
37+
colored2 (~> 3.1)
38+
escape (~> 0.0.4)
39+
fourflusher (>= 2.3.0, < 3.0)
40+
gh_inspector (~> 1.0)
41+
molinillo (~> 0.8.0)
42+
nap (~> 1.0)
43+
ruby-macho (>= 2.3.0, < 3.0)
44+
xcodeproj (>= 1.23.0, < 2.0)
45+
cocoapods-core (1.14.3)
46+
activesupport (>= 5.0, < 8)
47+
addressable (~> 2.8)
48+
algoliasearch (~> 1.0)
49+
concurrent-ruby (~> 1.1)
50+
fuzzy_match (~> 2.0.4)
51+
nap (~> 1.0)
52+
netrc (~> 0.11)
53+
public_suffix (~> 4.0)
54+
typhoeus (~> 1.0)
55+
cocoapods-deintegrate (1.0.5)
56+
cocoapods-downloader (2.1)
57+
cocoapods-plugins (1.0.0)
58+
nap
59+
cocoapods-search (1.0.1)
60+
cocoapods-trunk (1.6.0)
61+
nap (>= 0.8, < 2.0)
62+
netrc (~> 0.11)
63+
cocoapods-try (1.2.0)
64+
colored2 (3.1.2)
65+
concurrent-ruby (1.3.3)
66+
connection_pool (2.4.1)
67+
drb (2.2.1)
68+
escape (0.0.4)
69+
ethon (0.16.0)
70+
ffi (>= 1.15.0)
71+
ffi (1.17.0)
72+
ffi (1.17.0-aarch64-linux-gnu)
73+
ffi (1.17.0-aarch64-linux-musl)
74+
ffi (1.17.0-arm-linux-gnu)
75+
ffi (1.17.0-arm-linux-musl)
76+
ffi (1.17.0-arm64-darwin)
77+
ffi (1.17.0-x86-linux-gnu)
78+
ffi (1.17.0-x86-linux-musl)
79+
ffi (1.17.0-x86_64-darwin)
80+
ffi (1.17.0-x86_64-linux-gnu)
81+
ffi (1.17.0-x86_64-linux-musl)
82+
fourflusher (2.3.1)
83+
fuzzy_match (2.0.4)
84+
gh_inspector (1.1.3)
85+
httpclient (2.8.3)
86+
i18n (1.14.5)
87+
concurrent-ruby (~> 1.0)
88+
json (2.7.2)
89+
minitest (5.24.0)
90+
molinillo (0.8.0)
91+
mutex_m (0.2.0)
92+
nanaimo (0.3.0)
93+
nap (1.1.0)
94+
netrc (0.11.0)
95+
nkf (0.2.0)
96+
public_suffix (4.0.7)
97+
rexml (3.2.9)
98+
strscan
99+
ruby-macho (2.5.1)
100+
strscan (3.1.0)
101+
typhoeus (1.4.1)
102+
ethon (>= 0.9.0)
103+
tzinfo (2.0.6)
104+
concurrent-ruby (~> 1.0)
105+
xcodeproj (1.24.0)
106+
CFPropertyList (>= 2.3.3, < 4.0)
107+
atomos (~> 0.1.3)
108+
claide (>= 1.0.2, < 2.0)
109+
colored2 (~> 3.1)
110+
nanaimo (~> 0.3.0)
111+
rexml (~> 3.2.4)
112+
113+
PLATFORMS
114+
aarch64-linux-gnu
115+
aarch64-linux-musl
116+
arm-linux-gnu
117+
arm-linux-musl
118+
arm64-darwin
119+
ruby
120+
x86-linux-gnu
121+
x86-linux-musl
122+
x86_64-darwin
123+
x86_64-linux-gnu
124+
x86_64-linux-musl
125+
126+
DEPENDENCIES
127+
cocoapods (>= 1.13, < 1.15)
128+
129+
RUBY VERSION
130+
ruby 3.3.0p0
131+
132+
BUNDLED WITH
133+
2.5.3

example/android/app/build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,6 @@ android {
145145

146146
dependencies {
147147
implementation("com.facebook.react:react-android")
148-
implementation("com.facebook.react:flipper-integration")
149148
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
150149

151150
if (hermesEnabled.toBoolean()) {

example/android/app/src/main/java/com/geolocationexample/MainApplication.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import com.facebook.react.ReactPackage
99
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load
1010
import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost
1111
import com.facebook.react.defaults.DefaultReactNativeHost
12-
import com.facebook.react.flipper.ReactNativeFlipper
1312
import com.facebook.soloader.SoLoader
1413

1514
class MainApplication : Application(), ReactApplication {
@@ -31,7 +30,7 @@ class MainApplication : Application(), ReactApplication {
3130
}
3231

3332
override val reactHost: ReactHost
34-
get() = getDefaultReactHost(this.applicationContext, reactNativeHost)
33+
get() = getDefaultReactHost(applicationContext, reactNativeHost)
3534

3635
override fun onCreate() {
3736
super.onCreate()
@@ -40,6 +39,5 @@ class MainApplication : Application(), ReactApplication {
4039
// If you opted-in for the New Architecture, we load the native entry point for this app.
4140
load()
4241
}
43-
ReactNativeFlipper.initializeFlipper(this, reactNativeHost.reactInstanceManager)
4442
}
4543
}

example/android/app/src/main/res/drawable/rn_edit_text_material.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
android:insetLeft="@dimen/abc_edit_text_inset_horizontal_material"
1818
android:insetRight="@dimen/abc_edit_text_inset_horizontal_material"
1919
android:insetTop="@dimen/abc_edit_text_inset_top_material"
20-
android:insetBottom="@dimen/abc_edit_text_inset_bottom_material">
20+
android:insetBottom="@dimen/abc_edit_text_inset_bottom_material"
21+
>
2122

2223
<selector>
2324
<!--

example/android/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
buildscript {
44
ext {
55
buildToolsVersion = "34.0.0"
6-
minSdkVersion = 21
6+
minSdkVersion = 23
77
compileSdkVersion = 34
88
targetSdkVersion = 34
9-
ndkVersion = "25.1.8937393"
10-
kotlinVersion = "1.8.0"
9+
ndkVersion = "26.1.10909125"
10+
kotlinVersion = "1.9.22"
1111
}
1212
repositories {
1313
google()

example/android/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-all.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

example/android/gradlew

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -145,15 +145,15 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
145145
case $MAX_FD in #(
146146
max*)
147147
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
148-
# shellcheck disable=SC3045
148+
# shellcheck disable=SC2039,SC3045
149149
MAX_FD=$( ulimit -H -n ) ||
150150
warn "Could not query maximum file descriptor limit"
151151
esac
152152
case $MAX_FD in #(
153153
'' | soft) :;; #(
154154
*)
155155
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
156-
# shellcheck disable=SC3045
156+
# shellcheck disable=SC2039,SC3045
157157
ulimit -n "$MAX_FD" ||
158158
warn "Could not set maximum file descriptor limit to $MAX_FD"
159159
esac
@@ -202,11 +202,11 @@ fi
202202
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
203203
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
204204

205-
# Collect all arguments for the java command;
206-
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
207-
# shell script including quotes and variable substitutions, so put them in
208-
# double quotes to make sure that they get re-expanded; and
209-
# * put everything else in single quotes, so that it's not re-expanded.
205+
# Collect all arguments for the java command:
206+
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
207+
# and any embedded shellness will be escaped.
208+
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
209+
# treated as '${Hostname}' itself on the command line.
210210

211211
set -- \
212212
"-Dorg.gradle.appname=$APP_BASE_NAME" \

example/android/gradlew.bat

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@ set JAVA_EXE=java.exe
4343
%JAVA_EXE% -version >NUL 2>&1
4444
if %ERRORLEVEL% equ 0 goto execute
4545

46-
echo.
47-
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
48-
echo.
49-
echo Please set the JAVA_HOME variable in your environment to match the
50-
echo location of your Java installation.
46+
echo. 1>&2
47+
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
48+
echo. 1>&2
49+
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
50+
echo location of your Java installation. 1>&2
5151

5252
goto fail
5353

@@ -57,11 +57,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
5757

5858
if exist "%JAVA_EXE%" goto execute
5959

60-
echo.
61-
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
62-
echo.
63-
echo Please set the JAVA_HOME variable in your environment to match the
64-
echo location of your Java installation.
60+
echo. 1>&2
61+
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
62+
echo. 1>&2
63+
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
64+
echo location of your Java installation. 1>&2
6565

6666
goto fail
6767

0 commit comments

Comments
 (0)