Skip to content

Commit 4366578

Browse files
authored
fix: upgrade the RN version in example apps to 0.75.4 (#2739)
* fix: upgrade the RN version in example apps to 0.74.6 * fix: upgrade the RN version in example apps to 0.75.4 * fix: upgrade the RN version in example apps to 0.75.4 * fix: pod install issue * fix: pod install issue * fix: pod install issue * fix: pod install issue * fix: pod install issue
1 parent 308806e commit 4366578

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+4324
-1665
lines changed

examples/SampleApp/.gitignore

Lines changed: 12 additions & 4 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
#
@@ -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/Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
source 'https://rubygems.org'
22

33
# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
4-
ruby ">= 3.1"
4+
ruby ">= 2.6.10"
55

66
# Exclude problematic versions of cocoapods and activesupport that causes build failures.
77
gem 'cocoapods', '>= 1.13', '!= 1.15.0', '!= 1.15.1'

examples/SampleApp/android/app/build.gradle

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ apply plugin: "com.facebook.react"
1111
react {
1212
/* Folders */
1313
// The root of your project, i.e. where "package.json" lives. Default is '..'
14-
// root = file("../")
15-
// The folder where the react-native NPM package is. Default is ../node_modules/react-native
16-
// reactNativeDir = file("../node_modules/react-native")
17-
// The folder where the react-native Codegen package is. Default is ../node_modules/@react-native/codegen
18-
// codegenDir = file("../node_modules/@react-native/codegen")
19-
// The cli.js file which is the React Native CLI entrypoint. Default is ../node_modules/react-native/cli.js
20-
// cliFile = file("../node_modules/react-native/cli.js")
14+
// root = file("../../")
15+
// The folder where the react-native NPM package is. Default is ../../node_modules/react-native
16+
// reactNativeDir = file("../../node_modules/react-native")
17+
// The folder where the react-native Codegen package is. Default is ../../node_modules/@react-native/codegen
18+
// codegenDir = file("../../node_modules/@react-native/codegen")
19+
// The cli.js file which is the React Native CLI entrypoint. Default is ../../node_modules/react-native/cli.js
20+
// cliFile = file("../../node_modules/react-native/cli.js")
2121

2222
/* Variants */
2323
// The list of variants to that are debuggable. For those we're going to
@@ -51,6 +51,9 @@ react {
5151
//
5252
// The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map"
5353
// hermesFlags = ["-O", "-output-source-map"]
54+
55+
/* Autolinking */
56+
autolinkLibrariesWithApp()
5457
}
5558

5659
/**
@@ -113,7 +116,6 @@ android {
113116
dependencies {
114117
// The version of react-native is set by the React Native Gradle Plugin
115118
implementation("com.facebook.react:react-android")
116-
implementation("com.facebook.react:flipper-integration")
117119

118120
if (hermesEnabled.toBoolean()) {
119121
implementation("com.facebook.react:hermes-android")
@@ -140,5 +142,3 @@ dependencies {
140142

141143
androidTestImplementation('com.wix:detox:+')
142144
}
143-
144-
apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)

examples/SampleApp/android/app/src/main/AndroidManifest.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
android:label="@string/app_name" android:icon="@mipmap/ic_launcher"
2424
android:roundIcon="@mipmap/ic_launcher_round" android:allowBackup="false"
2525
android:requestLegacyExternalStorage="true"
26-
android:networkSecurityConfig="@xml/network_security_config" android:theme="@style/AppTheme">
26+
android:networkSecurityConfig="@xml/network_security_config" android:theme="@style/AppTheme"
27+
android:supportsRtl="true">
2728
<activity android:name=".MainActivity" android:label="@string/app_name"
2829
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize|uiMode"
2930
android:screenOrientation="portrait" android:launchMode="singleTask"

examples/SampleApp/android/app/src/main/java/com/sampleapp/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
}

examples/SampleApp/android/build.gradle

Lines changed: 3 additions & 5 deletions
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.24"
1412
androidXCore = "1.0.2"
1513
}
1614
repositories {

examples/SampleApp/android/gradle.properties

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ org.gradle.jvmargs=-Xmx2048m -XX:MaxMetaspaceSize=512m
2121
# Android operating system, and which are packaged with your app's APK
2222
# https://developer.android.com/topic/libraries/support-library/androidx-rn
2323
android.useAndroidX=true
24-
# Automatically convert third-party libraries to use AndroidX
25-
android.enableJetifier=true
2624

2725
# Use this property to specify which architecture you want to build.
2826
# You can also override it from the CLI using

examples/SampleApp/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.8-all.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

examples/SampleApp/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" \

examples/SampleApp/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)