Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions js/react_native/e2e/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ react {
// See https://github.com/react-native-community/cli/blob/main/docs/commands.md#bundle
// extraPackagerArgs = []

/* Autolinking */
autolinkLibrariesWithApp()

/* Hermes Commands */
// The hermes compiler command to run. By default it is 'hermesc'
// hermesCommand = "$rootDir/my-custom-hermesc/bin/hermesc"
Expand Down Expand Up @@ -122,7 +125,6 @@ dependencies {

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

if (hermesEnabled.toBoolean()) {
Expand All @@ -134,8 +136,6 @@ dependencies {
androidTestImplementation "androidx.test.espresso:espresso-core:3.5.0"
androidTestImplementation "androidx.test:runner:1.5.2"
androidTestImplementation "androidx.test:rules:1.5.0"

implementation (project(':onnxruntime-react-native'))
}

// Run this once to be able to run the application with BUCK
Expand All @@ -144,5 +144,3 @@ task copyDownloadableDepsToLibs(type: Copy) {
from configurations.implementation
into 'libs'
}

apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import com.facebook.react.ReactPackage
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load
import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost
import com.facebook.react.defaults.DefaultReactNativeHost
import com.facebook.react.flipper.ReactNativeFlipper
import com.facebook.react.soloader.OpenSourceMergedSoMapping
import com.facebook.soloader.SoLoader

class MainApplication : Application(), ReactApplication {
Expand Down Expand Up @@ -39,15 +39,14 @@ class MainApplication : Application(), ReactApplication {
}

override val reactHost: ReactHost
get() = getDefaultReactHost(this.applicationContext, reactNativeHost)
get() = getDefaultReactHost(applicationContext, reactNativeHost)
override fun onCreate() {
super.onCreate()
appContext = applicationContext
SoLoader.init(this, false)
SoLoader.init(this, OpenSourceMergedSoMapping)
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
// If you opted-in for the New Architecture, we load the native entry point for this app.
load()
}
ReactNativeFlipper.initializeFlipper(this, reactNativeHost.reactInstanceManager)
}
}
}
6 changes: 3 additions & 3 deletions js/react_native/e2e/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

buildscript {
ext {
buildToolsVersion = "34.0.0"
buildToolsVersion = "35.0.0"
minSdkVersion = 24
compileSdkVersion = 34
compileSdkVersion = 35
targetSdkVersion = 34
kotlinVersion = "1.8.0"
kotlinVersion = "1.9.25"
}
repositories {
google()
Expand Down
2 changes: 1 addition & 1 deletion js/react_native/e2e/android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
# org.gradle.parallel=true

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

reactNativeArchitectures=x86_64
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
6 changes: 4 additions & 2 deletions js/react_native/e2e/android/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
pluginManagement { includeBuild("../node_modules/@react-native/gradle-plugin") }
plugins { id("com.facebook.react.settings") }
extensions.configure(com.facebook.react.ReactSettingsExtension){ ex -> ex.autolinkLibrariesFromCommand() }
rootProject.name = 'OnnxruntimeModuleExample'
apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
include ':app'
includeBuild('../node_modules/@react-native/gradle-plugin')
includeBuild('../node_modules/@react-native/gradle-plugin')
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The gradle plugin path is included twice in this file: once in the pluginManagement block (line 1) and again with a standalone includeBuild statement (line 6). While this might be intentional for React Native 0.76's configuration, this pattern is unusual and could potentially cause issues. Please verify that both inclusions are necessary. If the second one (line 6) is redundant, it should be removed to avoid potential build conflicts.

Suggested change
includeBuild('../node_modules/@react-native/gradle-plugin')

Copilot uses AI. Check for mistakes.
2 changes: 0 additions & 2 deletions js/react_native/e2e/ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ target 'OnnxruntimeModuleExample' do

use_react_native!(
:path => config[:reactNativePath],

# :flipper_configuration => FlipperConfiguration.enabled,
:app_path => "#{Pod::Config.instance.installation_root}/.."
)

Expand Down
Loading
Loading