Skip to content

Commit b5fd89b

Browse files
committed
fix(react-native): add prefabPublishing to hermes-engine for build-from-source
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.
1 parent 1575ae0 commit b5fd89b

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)