Skip to content

Commit d0074ca

Browse files
committed
[rn] upgrade react native version to 0.76.x
1 parent 0a478c0 commit d0074ca

File tree

10 files changed

+5593
-6752
lines changed

10 files changed

+5593
-6752
lines changed

js/react_native/e2e/android/app/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ react {
4343
// See https://github.com/react-native-community/cli/blob/main/docs/commands.md#bundle
4444
// extraPackagerArgs = []
4545

46+
/* Autolinking */
47+
autolinkLibrariesWithApp()
48+
4649
/* Hermes Commands */
4750
// The hermes compiler command to run. By default it is 'hermesc'
4851
// hermesCommand = "$rootDir/my-custom-hermesc/bin/hermesc"
@@ -122,7 +125,6 @@ dependencies {
122125

123126
// The version of react-native is set by the React Native Gradle Plugin
124127
implementation("com.facebook.react:react-android")
125-
implementation("com.facebook.react:flipper-integration")
126128
implementation 'androidx.test.ext:junit:1.1.5'
127129

128130
if (hermesEnabled.toBoolean()) {
@@ -144,5 +146,3 @@ task copyDownloadableDepsToLibs(type: Copy) {
144146
from configurations.implementation
145147
into 'libs'
146148
}
147-
148-
apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)

js/react_native/e2e/android/app/src/main/java/com/reactnativeonnxruntimemodule/MainApplication.kt

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import com.facebook.react.ReactPackage
1010
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load
1111
import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost
1212
import com.facebook.react.defaults.DefaultReactNativeHost
13-
import com.facebook.react.flipper.ReactNativeFlipper
13+
import com.facebook.react.soloader.OpenSourceMergedSoMapping
1414
import com.facebook.soloader.SoLoader
1515

1616
class MainApplication : Application(), ReactApplication {
@@ -39,15 +39,14 @@ class MainApplication : Application(), ReactApplication {
3939
}
4040

4141
override val reactHost: ReactHost
42-
get() = getDefaultReactHost(this.applicationContext, reactNativeHost)
42+
get() = getDefaultReactHost(applicationContext, reactNativeHost)
4343
override fun onCreate() {
4444
super.onCreate()
4545
appContext = applicationContext
46-
SoLoader.init(this, false)
46+
SoLoader.init(this, OpenSourceMergedSoMapping)
4747
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
4848
// If you opted-in for the New Architecture, we load the native entry point for this app.
4949
load()
5050
}
51-
ReactNativeFlipper.initializeFlipper(this, reactNativeHost.reactInstanceManager)
5251
}
53-
}
52+
}

js/react_native/e2e/android/build.gradle

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

33
buildscript {
44
ext {
5-
buildToolsVersion = "34.0.0"
5+
buildToolsVersion = "35.0.0"
66
minSdkVersion = 24
7-
compileSdkVersion = 34
7+
compileSdkVersion = 35
88
targetSdkVersion = 34
9-
kotlinVersion = "1.8.0"
9+
kotlinVersion = "1.9.25"
1010
}
1111
repositories {
1212
google()

js/react_native/e2e/android/gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@
1818
# org.gradle.parallel=true
1919

2020
android.useAndroidX=true
21-
android.enableJetifier=true
2221
org.gradle.jvmargs=-Xmx8192m -XX:MaxMetaspaceSize=2048m -Dkotlin.daemon.jvm.options=-Xmx8192m
2322
# Use this property to enable or disable the Hermes JS engine.
2423
# If set to false, you will be using JSC instead.
24+
newArchEnabled=true
2525
hermesEnabled=true
2626

2727
reactNativeArchitectures=x86_64

js/react_native/e2e/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.10.2-all.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1+
pluginManagement { includeBuild("../node_modules/@react-native/gradle-plugin") }
2+
plugins { id("com.facebook.react.settings") }
3+
extensions.configure(com.facebook.react.ReactSettingsExtension){ ex -> ex.autolinkLibrariesFromCommand() }
14
rootProject.name = 'OnnxruntimeModuleExample'
2-
apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
35
include ':app'
4-
includeBuild('../node_modules/@react-native/gradle-plugin')
6+
includeBuild('../node_modules/@react-native/gradle-plugin')

0 commit comments

Comments
 (0)