Skip to content

fix(react-native): add prefabPublishing to hermes-engine for build-from-source#55310

Closed
chrfalch wants to merge 1 commit into
mainfrom
@chrfalch/fix-build-from-source-for-android
Closed

fix(react-native): add prefabPublishing to hermes-engine for build-from-source#55310
chrfalch wants to merge 1 commit into
mainfrom
@chrfalch/fix-build-from-source-for-android

Conversation

@chrfalch

@chrfalch chrfalch commented Jan 27, 2026

Copy link
Copy Markdown
Collaborator

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.

Closes #55290

Changelog:

[ANDROID] [FIXED] - Re-added prefabPublishing=true to make Android build from source work again

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

…om-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.
@chrfalch chrfalch requested a review from j-piasecki January 27, 2026 12:23
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jan 27, 2026
@chrfalch chrfalch requested a review from cortinico January 27, 2026 12:23
@facebook-github-bot facebook-github-bot added the Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. label Jan 27, 2026

@cortinico cortinico left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch @chrfalch !

@cortinico

Copy link
Copy Markdown
Contributor

@chrfalch can you open a pick request for this one please?

@meta-codesync

meta-codesync Bot commented Jan 27, 2026

Copy link
Copy Markdown

@cortinico has imported this pull request. If you are a Meta employee, you can view this in D91581389.

@meta-codesync

meta-codesync Bot commented Jan 27, 2026

Copy link
Copy Markdown

@cortinico merged this pull request in e8eb374.

alanleedev pushed a commit that referenced this pull request Jan 29, 2026
…om-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
@react-native-bot

Copy link
Copy Markdown
Collaborator

This pull request was successfully merged by @chrfalch in 8206c12

When will my fix make it into a release? | How to file a pick request?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged. p: Expo Partner: Expo Partner Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

React Native fails to build from source on 0.84-rcX on Android : Could not find a package configuration file provided by "hermes-engine"

5 participants