buildscript { ext { buildToolsVersion = "37.0.0" minSdkVersion = 24 compileSdkVersion = 37 targetSdkVersion = 36 ndkVersion = "27.3.13750724" kotlinVersion = "2.2.0" } repositories { google() mavenCentral() } dependencies { classpath("com.android.tools.build:gradle") classpath("com.facebook.react:react-native-gradle-plugin") classpath("org.jetbrains.kotlin:kotlin-gradle-plugin") // Add the Google Services plugin dependency // This is used exclusively for sending benchmarks (with user consent) to Hugging Face Spaces via Firebase. // Firebase is used for App Check functionality, allowing unauthenticated users to submit their benchmark data securely. classpath 'com.google.gms:google-services:4.4.4' } } apply plugin: "com.facebook.react.rootproject" def onnxruntimeVersion = { def packageJson = file("$rootDir/../node_modules/onnxruntime-react-native/package.json") if (!packageJson.canRead()) { throw new GradleException("Cannot read ${packageJson}; run yarn install") } def version = new groovy.json.JsonSlurper().parse(packageJson).version if (!version) { throw new GradleException("No version in ${packageJson}") } return version }() allprojects { configurations.all { resolutionStrategy { // onnxruntime-react-native floats this at latest.integration; ship the AAR it was released with. force "com.microsoft.onnxruntime:onnxruntime-android:${onnxruntimeVersion}" } } }