From 19cba09df8a3670509a11e2d82a48443c037f35d Mon Sep 17 00:00:00 2001 From: Riccardo Cipolleschi Date: Thu, 16 Apr 2026 22:04:23 +0100 Subject: [PATCH] [Android] Use Hermes V1 by default --- build.gradle.kts | 8 +++++++- .../react-native/sdks/hermes-engine/version.properties | 2 +- scripts/try-set-nightly-hermes-compiler.js | 6 +++--- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 65cec5f60c40..4a6b54e56f89 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -137,7 +137,13 @@ if (project.findProperty("react.internal.useHermesStable")?.toString()?.toBoolea ) } - hermesSubstitution = "$hermesCompilerVersion-SNAPSHOT" to "Users opted to use hermes nightly" + val hermesV1Enabled = + project.findProperty("hermesV1Enabled")?.toString()?.toBoolean() ?: true + // Hermes V1 stable releases are published without the -SNAPSHOT suffix. + // Legacy nightly builds use -SNAPSHOT. + val resolvedVersion = + if (hermesV1Enabled) hermesCompilerVersion else "$hermesCompilerVersion-SNAPSHOT" + hermesSubstitution = resolvedVersion to "Users opted to use hermes nightly" } else { logger.warn( """ diff --git a/packages/react-native/sdks/hermes-engine/version.properties b/packages/react-native/sdks/hermes-engine/version.properties index 4e24a29fd47d..e5d8f2e9a530 100644 --- a/packages/react-native/sdks/hermes-engine/version.properties +++ b/packages/react-native/sdks/hermes-engine/version.properties @@ -1,2 +1,2 @@ HERMES_VERSION_NAME=1000.0.0 -HERMES_V1_VERSION_NAME=250829098.0.11 +HERMES_V1_VERSION_NAME=250829098.0.12 diff --git a/scripts/try-set-nightly-hermes-compiler.js b/scripts/try-set-nightly-hermes-compiler.js index ef931e4a6b9b..6b3edd0c9415 100644 --- a/scripts/try-set-nightly-hermes-compiler.js +++ b/scripts/try-set-nightly-hermes-compiler.js @@ -16,10 +16,10 @@ function main() { const hermesCompilerVersion = packageJson.dependencies['hermes-compiler']; if (hermesCompilerVersion === '0.0.0') { - console.log(`Hermes compiler version not set. Updating to the latest nightly release.`); - execSync('yarn workspace react-native add hermes-compiler@nightly --exact', { stdio: 'inherit' }); + console.log(`Hermes compiler version not set. Updating to the latest-v1 release.`); + execSync('yarn workspace react-native add hermes-compiler@latest-v1 --exact', { stdio: 'inherit' }); } else { - console.log(`Hermes compiler version set to ${hermesCompilerVersion}. Not setting nightly hermes.`); + console.log(`Hermes compiler version set to ${hermesCompilerVersion}. Not setting hermes.`); } }