From 4501418dd3ecfecac9624e4ec809c8e68a729b54 Mon Sep 17 00:00:00 2001 From: Nicola Corti Date: Fri, 14 Jun 2024 09:45:34 -0700 Subject: [PATCH] Fix for broken test_helloworld_android on Release Summary: 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 --- packages/helloworld/android/app/build.gradle | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/helloworld/android/app/build.gradle b/packages/helloworld/android/app/build.gradle index 9518cf5ce7ab..76fbb4d15578 100644 --- a/packages/helloworld/android/app/build.gradle +++ b/packages/helloworld/android/app/build.gradle @@ -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")) +}