Skip to content

Commit f624998

Browse files
cortinicofacebook-github-bot
authored andcommitted
Gradle 8.x prep - specify task dependency between mergeNativeLibs and external native builds (#36253)
Summary: Pull Request resolved: #36253 Another build warning that got converted into a failure in Gradle 8.x Specifically here as we're running 4 native builds in parallel for RN Tester, but they all originate from 2 CMake intermediates files (one set for Debug and one for Release), Gradle raises a warning. Here I'm fixing this warning by specifying an explicit ordering between those tasks. Changelog: [Internal] [Changed] - Gradle 8.x prep - specify task dependency between mergeNativeLibs and external native builds Reviewed By: cipolleschi Differential Revision: D43501128 fbshipit-source-id: ebd5797b4c8cf7044515e9d9c59f8d146a3524e2
1 parent 3c034cd commit f624998

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

packages/rn-tester/android/app/build.gradle

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,4 +206,12 @@ afterEvaluate {
206206
// As we're consuming Hermes from source, we want to make sure
207207
// `hermesc` is built before we actually invoke the `emit*HermesResource` task
208208
createBundleHermesReleaseJsAndAssets.dependsOn(":ReactAndroid:hermes-engine:buildHermes")
209+
210+
// As we're building 4 native flavors in parallel, there is clash on the `.cxx/Debug` and
211+
// `.cxx/Release` folder where the CMake intermediates are stored.
212+
// We fixing this by instructing Gradle to always mergeLibs after they've been built.
213+
mergeHermesDebugNativeLibs.mustRunAfter(externalNativeBuildJscDebug)
214+
mergeHermesReleaseNativeLibs.mustRunAfter(externalNativeBuildJscRelease)
215+
mergeJscDebugNativeLibs.mustRunAfter(externalNativeBuildHermesDebug)
216+
mergeJscReleaseNativeLibs.mustRunAfter(externalNativeBuildHermesRelease)
209217
}

0 commit comments

Comments
 (0)