diff --git a/private/react-native-fantom/build.gradle.kts b/private/react-native-fantom/build.gradle.kts index d63fdfeb7d416c..48a8a52b2c41af 100644 --- a/private/react-native-fantom/build.gradle.kts +++ b/private/react-native-fantom/build.gradle.kts @@ -6,6 +6,7 @@ */ import com.android.build.gradle.internal.tasks.factory.dependsOn +import com.facebook.react.internal.PrivateReactExtension import com.facebook.react.tasks.internal.* import com.facebook.react.tasks.internal.utils.* import de.undercouch.gradle.tasks.download.Download @@ -15,6 +16,9 @@ plugins { alias(libs.plugins.download) } +val hermesV1Enabled = + rootProject.extensions.getByType(PrivateReactExtension::class.java).hermesV1Enabled.get() + // This is the version of CMake we're requesting to the Android SDK to use. // If missing it will be downloaded automatically. Only CMake versions shipped with the // Android SDK are supported (you can find them listed in the SDK Manager of Android Studio). @@ -203,6 +207,11 @@ val configureFantomTester by "-DREACT_THIRD_PARTY_NDK_DIR=$reactAndroidBuildDir/third-party-ndk", "-DRN_ENABLE_DEBUG_STRING_CONVERTIBLE=ON", ) + + if (hermesV1Enabled) { + cmdArgs.add("-DHERMES_V1_ENABLED=1") + } + commandLine(cmdArgs) standardOutputFile.set(project.file("$buildDir/reports/configure-fantom_tester.log")) errorOutputFile.set(project.file("$buildDir/reports/configure-fantom_tester.error.log"))