Skip to content

Commit 577efb1

Browse files
authored
feat: bump RN to 0.74 in Example (#2263)
# Summary PR bumping the Example app to newest RN version.
1 parent 3ea8fc4 commit 577efb1

File tree

34 files changed

+1321
-3525
lines changed

34 files changed

+1321
-3525
lines changed

Example/.gitignore

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ DerivedData
2020
*.hmap
2121
*.ipa
2222
*.xcuserstate
23-
ios/.xcode.env.local
23+
**/.xcode.env.local
2424

2525
# Android/IntelliJ
2626
#
@@ -56,11 +56,19 @@ yarn-error.log
5656
*.jsbundle
5757

5858
# Ruby / CocoaPods
59-
/ios/Pods/
59+
**/Pods/
6060
/vendor/bundle/
6161

6262
# Temporary files created by Metro to check the health of the file watcher
6363
.metro-health-check*
6464

6565
# testing
6666
/coverage
67+
68+
# Yarn
69+
.yarn/*
70+
!.yarn/patches
71+
!.yarn/plugins
72+
!.yarn/releases
73+
!.yarn/sdks
74+
!.yarn/versions

Example/Gemfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,7 @@ source 'https://rubygems.org'
33
# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
44
ruby ">= 2.6.10"
55

6-
gem 'cocoapods', '~> 1.13'
7-
gem 'activesupport', '>= 6.1.7.3', '< 7.1.0'
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'
9+
gem 'activesupport', '>= 6.1.7.5', '< 7.1.0'

Example/Gemfile.lock

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
GEM
22
remote: https://rubygems.org/
33
specs:
4-
CFPropertyList (3.0.6)
4+
CFPropertyList (3.0.7)
5+
base64
6+
nkf
57
rexml
6-
activesupport (7.0.8)
8+
activesupport (7.0.8.1)
79
concurrent-ruby (~> 1.0, >= 1.0.2)
810
i18n (>= 1.6, < 2)
911
minitest (>= 5.1)
@@ -14,6 +16,7 @@ GEM
1416
httpclient (~> 2.8, >= 2.8.3)
1517
json (>= 1.5.1)
1618
atomos (0.1.3)
19+
base64 (0.2.0)
1720
claide (1.1.0)
1821
cocoapods (1.14.3)
1922
addressable (~> 2.8)
@@ -53,7 +56,7 @@ GEM
5356
netrc (~> 0.11)
5457
cocoapods-try (1.2.0)
5558
colored2 (3.1.2)
56-
concurrent-ruby (1.2.2)
59+
concurrent-ruby (1.2.3)
5760
escape (0.0.4)
5861
ethon (0.16.0)
5962
ffi (>= 1.15.0)
@@ -62,22 +65,23 @@ GEM
6265
fuzzy_match (2.0.4)
6366
gh_inspector (1.1.3)
6467
httpclient (2.8.3)
65-
i18n (1.14.1)
68+
i18n (1.14.4)
6669
concurrent-ruby (~> 1.0)
67-
json (2.7.1)
68-
minitest (5.20.0)
70+
json (2.7.2)
71+
minitest (5.22.3)
6972
molinillo (0.8.0)
7073
nanaimo (0.3.0)
7174
nap (1.1.0)
7275
netrc (0.11.0)
76+
nkf (0.2.0)
7377
public_suffix (4.0.7)
7478
rexml (3.2.6)
7579
ruby-macho (2.5.1)
7680
typhoeus (1.4.1)
7781
ethon (>= 0.9.0)
7882
tzinfo (2.0.6)
7983
concurrent-ruby (~> 1.0)
80-
xcodeproj (1.23.0)
84+
xcodeproj (1.24.0)
8185
CFPropertyList (>= 2.3.3, < 4.0)
8286
atomos (~> 0.1.3)
8387
claide (>= 1.0.2, < 2.0)
@@ -89,11 +93,11 @@ PLATFORMS
8993
ruby
9094

9195
DEPENDENCIES
92-
activesupport (>= 6.1.7.3, < 7.1.0)
93-
cocoapods (~> 1.13)
96+
activesupport (>= 6.1.7.5, < 7.1.0)
97+
cocoapods (>= 1.13, < 1.15)
9498

9599
RUBY VERSION
96100
ruby 3.2.1p31
97101

98102
BUNDLED WITH
99-
2.4.6
103+
2.4.19

Example/android/app/build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ android {
107107
dependencies {
108108
// The version of react-native is set by the React Native Gradle Plugin
109109
implementation("com.facebook.react:react-android")
110-
implementation("com.facebook.react:flipper-integration")
111110

112111
if (hermesEnabled.toBoolean()) {
113112
implementation("com.facebook.react:hermes-android")

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

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,17 @@ 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 {
1615

1716
override val reactNativeHost: ReactNativeHost =
1817
object : DefaultReactNativeHost(this) {
19-
override fun getPackages(): List<ReactPackage> {
20-
// Packages that cannot be autolinked yet can be added manually here, for example:
21-
// packages.add(new MyReactNativePackage());
22-
return PackageList(this).packages
23-
}
18+
override fun getPackages(): List<ReactPackage> =
19+
PackageList(this).packages.apply {
20+
// Packages that cannot be autolinked yet can be added manually here, for example:
21+
// add(MyReactNativePackage())
22+
}
2423

2524
override fun getJSMainModuleName(): String = "index"
2625

@@ -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
@@ -1,11 +1,11 @@
11
buildscript {
22
ext {
33
buildToolsVersion = "34.0.0"
4-
minSdkVersion = 21
4+
minSdkVersion = 23
55
compileSdkVersion = 34
66
targetSdkVersion = 34
7-
ndkVersion = "25.1.8937393"
8-
kotlinVersion = "1.8.0"
7+
ndkVersion = "26.1.10909125"
8+
kotlinVersion = "1.9.22"
99
}
1010
repositories {
1111
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 set to an invalid directory: %JAVA_HOME% 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)