mirror of
https://github.com/facebook/react-native.git
synced 2026-11-18 20:19:07 +00:00
Use prebuilt Hermes by default when building Android (#54707)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/54707 Changelog: [Internal] Reviewed By: cortinico Differential Revision: D87929652 fbshipit-source-id: 439eef5eea9b9203cf2a7b5a8eae38d83e192bd5
This commit is contained in:
1 parent
b9ac40876e
commit
076e6a1d53
9 files changed
+106
-23
No files matched your search
@@ -0,0 +1,26 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
// @flow
|
||||
const { execSync } = require('child_process');
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
function main() {
|
||||
const packageJsonPath = path.join(__dirname, '../packages/react-native/package.json');
|
||||
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'));
|
||||
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' });
|
||||
} else {
|
||||
console.log(`Hermes compiler version set to ${hermesCompilerVersion}. Not setting nightly hermes.`);
|
||||
}
|
||||
}
|
||||
|
||||
main();
|
||||
Reference in new issue
Block a user