-
Notifications
You must be signed in to change notification settings - Fork 3
Check Hermes override pre-condition from Host package when building for Android #234
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
b55f856
to
46934c5
Compare
Drafting this again, since it seems Gradle is having a hard time executing the CLI on Windows. |
3a11ac5
to
d8b9a83
Compare
c1a69c0
to
78f34dc
Compare
78f34dc
to
c6a7d68
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds validation and fixes for React Native Node-API's Android build process, specifically ensuring proper Hermes configuration and improving cross-platform compatibility.
- Adds a
checkHermesOverride
Gradle task to verifyREACT_NATIVE_OVERRIDE_HERMES_DIR
environment variable is set - Fixes Windows compatibility for CLI auto-linking in Gradle builds
- Adds comprehensive test coverage for Gradle tasks and CLI functionality
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
packages/host/android/build.gradle | Adds Hermes override validation task and fixes Windows CLI execution |
packages/host/src/node/gradle.test.ts | New test file for Gradle task validation |
packages/host/src/node/cli/bin.test.ts | New test file for CLI command validation |
packages/host/package.json | Adds test script for Gradle-specific tests |
.github/workflows/check.yml | Enables Gradle tests in CI environment |
.changeset/silver-suits-double.md | Documents the Hermes override assertion feature |
.changeset/many-candies-retire.md | Documents the Windows auto-linking fix |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Pushed a fix for the failure to call into the CLI on Windows. |
Co-authored-by: Copilot <[email protected]>
Ideally, we would have liked to inject the overriding of Hermes source directory from within, but haven't found a way to do that. Until we find a way we can assert that it's done by the caller.
Merging this PR will:
checkHermesOverride
to the host package Gradle build script to ensureREACT_NATIVE_OVERRIDE_HERMES_DIR
is set (fixing Sanity check of Hermes source directory via environment variable, when building Android projects #163).linkNodeApiModules
task is calling into the CLI to execute auto-linking.