Skip to content

Commit 8206c12

Browse files
chrfalchalanleedev
authored andcommitted
fix(react-native): add prefabPublishing to hermes-engine for build-from-source (#55310)
Summary: PR #54707 removed `prefabPublishing = true` from hermes-engine when switching to prebuilt Hermes by default. This broke build-from-source because AGP no longer generates the CMake config file needed by `find_package(hermes-engine)` in ReactAndroid's native build. Adding `prefabPublishing = true` back restores the CMake config generation and proper Gradle task ordering. The same PR also disables all hermes tasks when not building from source - which will make the CI work correctly - ie. not build hermes from source when not needed. ## Changelog: [ANDROID] [FIXED] - Re-added prefabPublishing=true to make Android build from source work again Pull Request resolved: #55310 Test Plan: - Build RN Tester and build from source, verify that Android builds correctly. - Check CI and verify that Hermes is not built from source Reviewed By: cipolleschi Differential Revision: D91581389 Pulled By: cortinico fbshipit-source-id: 01953cc071d22faa84920ebe30cc1426c8d420e4
1 parent 952340a commit 8206c12

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

packages/react-native/ReactAndroid/hermes-engine/build.gradle.kts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,10 @@ android {
421421
java.srcDirs("$hermesDir/lib/Platform/Intl/java", "$hermesDir/lib/Platform/Unicode/java")
422422
}
423423

424-
buildFeatures { prefab = true }
424+
buildFeatures {
425+
prefab = true
426+
prefabPublishing = true
427+
}
425428

426429
dependencies {
427430
implementation(libs.fbjni)

0 commit comments

Comments
 (0)