mirror of
https://github.com/react/react-native.git
synced 2026-09-29 16:58:04 +08:00
Remove hermesV1Enabled Gradle property and simplify Hermes version resolution (#56733)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/56733 - Remove `hermesV1Enabled` / `react.hermesV1Enabled` Gradle property and all branching it controls - Rename `HERMES_V1_VERSION_NAME` to `HERMES_VERSION_NAME` in `version.properties` - Remove `hermesV1Enabled` from `PrivateReactExtension`, `ProjectUtils`, `PropertyUtils`, `ReactPlugin` - Simplify `DependencyUtils.Coordinates` to single Hermes version - Make `-DHERMESVM_HEAP_HV_MODE=HEAP_HV_PREFER32` CMake flag unconditional - Remove `-DHERMES_V1_ENABLED=1` CMake argument from `ReactAndroid` and Fantom builds - Delete `hermesV1Enabled=true` from `gradle.properties` - Update all Gradle plugin tests ## Changelog: [Android][Removed] - Remove hermesV1Enabled and simplify the code ## Test plan - [x] Gradle plugin: `./gradlew -p packages/gradle-plugin build` — BUILD SUCCESSFUL, all tests pass - [x] Android: `./gradlew :packages:rn-tester:android:app:assembleDebug` — BUILD SUCCESSFUL Reviewed By: cortinico Differential Revision: D104244582 fbshipit-source-id: 7d12af5b934aac9d431e89d9a2eac41213c997a1
This commit is contained in:
committed by
meta-codesync[bot]
parent
f9476256bd
commit
0a5c8c6b4b
@@ -102,11 +102,8 @@ async function updateHermesCompilerVersionInDependencies(
|
||||
|
||||
async function updateHermesRuntimeDependenciesVersions(
|
||||
hermesVersion /*: string */,
|
||||
hermesV1Version /*: string */,
|
||||
) /*: Promise<void> */ {
|
||||
const newVersionsFile =
|
||||
`HERMES_VERSION_NAME=${hermesVersion}\n` +
|
||||
`HERMES_V1_VERSION_NAME=${hermesV1Version}`;
|
||||
const newVersionsFile = `HERMES_VERSION_NAME=${hermesVersion}`;
|
||||
|
||||
await fs.writeFile(MAVEN_VERSIONS_FILE_PATH, newVersionsFile.trim() + '\n');
|
||||
}
|
||||
@@ -116,8 +113,11 @@ async function updateHermesVersionsToNightly() {
|
||||
await updateHermesCompilerVersionInDependencies(
|
||||
hermesVersions.compilerV1Version,
|
||||
);
|
||||
// Both Android Gradle and the iOS podspec now resolve Hermes from the single
|
||||
// HERMES_VERSION_NAME key, so we must write the latest-v1 value into it.
|
||||
// The legacy nightly v0 version (`runtimeVersion`) is not published to Maven
|
||||
// Central and would leave Android falling back to BUILD_FROM_GITHUB_MAIN.
|
||||
await updateHermesRuntimeDependenciesVersions(
|
||||
hermesVersions.runtimeVersion,
|
||||
hermesVersions.runtimeV1Version,
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user