Fix for broken test_helloworld_android on Release (#44952)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44952

The test_helloworld_android Release variant are broken on GHA.
This fixes it as it forces hermesc to be built *before* the app attempts to create a bundle.

Changelog:
[Internal] [Changed] - Fix for broken test_helloworld_android on Release

Reviewed By: cipolleschi, blakef

Differential Revision: D58591480

fbshipit-source-id: 2afc1cfe8c416da6f5919d20098639653798dd1a
This commit is contained in:
Nicola Corti
2024-06-14 11:11:20 -07:00
committed by Facebook GitHub Bot
parent f1a362d834
commit 2b640bec34
@@ -137,3 +137,11 @@ dependencies {
implementation jscFlavor
}
}
afterEvaluate {
// As HelloWorld is building from source, we need to make sure hermesc is built before the JS bundle is created.
// Otherwise the release version of the app will fail to build due to missing hermesc.
tasks
.getByName("createBundleReleaseJsAndAssets")
.dependsOn(gradle.includedBuild("react-native").task(":packages:react-native:ReactAndroid:hermes-engine:buildHermesC"))
}