Skip to content

Commit 0d1c52c

Browse files
committed
fix: upgrade the RN version in example apps to 0.74.6
1 parent 4756d0d commit 0d1c52c

File tree

35 files changed

+3341
-1465
lines changed

35 files changed

+3341
-1465
lines changed

examples/SampleApp/.gitignore

+12-4
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
#
@@ -57,10 +57,18 @@ yarn-error.log
5757
*.jsbundle
5858

5959
# Ruby / CocoaPods
60-
/ios/Pods/
61-
/vendor
60+
**/Pods/
61+
/vendor/bundle
6262
# Temporary files created by Metro to check the health of the file watcher
6363
.metro-health-check*
6464

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

examples/SampleApp/android/app/build.gradle

-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@ android {
113113
dependencies {
114114
// The version of react-native is set by the React Native Gradle Plugin
115115
implementation("com.facebook.react:react-android")
116-
implementation("com.facebook.react:flipper-integration")
117116

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

examples/SampleApp/android/app/src/main/java/com/sampleapp/MainApplication.kt

+1-3
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
}

examples/SampleApp/android/build.gradle

+3-5
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,11 @@ import org.apache.tools.ant.taskdefs.condition.Os
44
buildscript {
55
ext {
66
buildToolsVersion = "34.0.0"
7-
// Added 24 for react-native-audio-recorder-player(Value - 24)
8-
minSdkVersion = 24
7+
minSdkVersion = 23
98
compileSdkVersion = 34
109
targetSdkVersion = 34
11-
ndkVersion = "25.1.8937393"
12-
// Added for react-native-audio-recorder-player(Value - 1.6.10)
13-
kotlinVersion = "1.6.10"
10+
ndkVersion = "26.1.10909125"
11+
kotlinVersion = "1.9.22"
1412
androidXCore = "1.0.2"
1513
}
1614
repositories {

examples/SampleApp/android/gradle/wrapper/gradle-wrapper.properties

+1-1
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

examples/SampleApp/android/gradlew

+7-7
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" \

examples/SampleApp/android/gradlew.bat

+10-10
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

examples/SampleApp/ios/Podfile

+2-18
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,6 @@ require Pod::Executable.execute_command('node', ['-p',
88
platform :ios, min_ios_version_supported
99
prepare_react_native_project!
1010

11-
# If you are using a `react-native-flipper` your iOS build will fail when `NO_FLIPPER=1` is set.
12-
# because `react-native-flipper` depends on (FlipperKit,...) that will be excluded
13-
#
14-
# To fix this you can also exclude `react-native-flipper` using a `react-native.config.js`
15-
# ```js
16-
# module.exports = {
17-
# dependencies: {
18-
# ...(process.env.NO_FLIPPER ? { 'react-native-flipper': { platforms: { ios: null } } } : {}),
19-
# ```
20-
flipper_config = ENV['NO_FLIPPER'] == "1" ? FlipperConfiguration.disabled : FlipperConfiguration.enabled
21-
2211
linkage = ENV['USE_FRAMEWORKS']
2312
if linkage != nil
2413
Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green
@@ -42,16 +31,10 @@ target 'SampleApp' do
4231
# Beginning with firebase-ios-sdk v9+ (react-native-firebase v15+) we must tell CocoaPods to use frameworks.
4332
# https://rnfirebase.io/#altering-cocoapods-to-use-frameworks
4433
use_frameworks! :linkage => :static
45-
# Note: must disable flipper due to enabling static linkage
4634
$RNFirebaseAsStaticFramework = true
4735

4836
use_react_native!(
4937
:path => config[:reactNativePath],
50-
# Enables Flipper.
51-
#
52-
# Note that if you have use_frameworks! enabled, Flipper will not work and
53-
# you should disable the next line.
54-
# :flipper_configuration => flipper_config,
5538
# An absolute path to your application root.
5639
:app_path => "#{Pod::Config.instance.installation_root}/.."
5740
)
@@ -69,7 +52,8 @@ target 'SampleApp' do
6952
react_native_post_install(
7053
installer,
7154
config[:reactNativePath],
72-
:mac_catalyst_enabled => false
55+
:mac_catalyst_enabled => false,
56+
# :ccache_enabled => true
7357
)
7458
end
7559
end

0 commit comments

Comments
 (0)