-
Notifications
You must be signed in to change notification settings - Fork 25.1k
fix: android artifacts in a release package #30470
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
fix: android artifacts in a release package #30470
Conversation
alloy
left a comment
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.
Great sleuthing, @grabbou 🕵️
Co-authored-by: Eloy Durán <eloy.de.enige@gmail.com>
Co-authored-by: Eloy Durán <eloy.de.enige@gmail.com>
|
Shipped Ready to be merged. |
facebook-github-bot
left a comment
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.
@hramos has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
|
Thanks for sending the PR. I'm closing this as the logic is completely rewritten now. |
Summary
Android artefacts in a release package are missing, as a result, users are not able to run
0.64.0-rc.0on Android. Locally, everything works.After several hours of testing, we found out that running
./gradlew ReactAndroid:installArchiveswill "sometimes" fix it and I have managed to verify both locally and on the CI, that running Gradle without cache is broken, but when running Gradle once again (right after corrupted build completed, but there is cache already) fixes the issue.Seems to be Gradle related.
In this PR, I am adding a validation to
publish-npm.jsscript to make sure this kind of errors never happen again in the future. We also attempt to rebuild Android once, hoping that it will pass the validation.Here's the truncated output of the script:
Test Plan
Run the newly added code via
nodeand you should see the script re-runninginstallArchivesand creating correct artifact. You can use this gist contents to just paste intopublish-npm.js.Remember to update the version in
package.jsonto0.64.0-rc.0and run:before doing anything, to make sure you start fresh.