Skip to content
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

use correct gradle packageTask and asserts dir for android libraries #32026

Closed

Conversation

Legion2
Copy link
Contributor

@Legion2 Legion2 commented Aug 17, 2021

Summary

Fixes #29577 and react-native-community/upgrade-support#93, when building an android library the package task has a different name, which was not handled correctly in the react.gradle file. The fix uses the existing packageTask variable which is correctly set for applications and libraries. This PR also copies the bundled js file into the correct assets directory, which is different from the assets directory of applications.

Changelog

[Android] [Fixed] - Fixed Android library builds with react.gradle file

Test Plan

Tested with my android library build which includes the react.gradle file and the build succeeded.

@facebook-github-bot facebook-github-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 Aug 17, 2021
@analysis-bot
Copy link

Platform Engine Arch Size (bytes) Diff
ios - universal n/a --

Base commit: 6daf5bb

@analysis-bot
Copy link

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 9,244,077 +0
android hermes armeabi-v7a 8,756,540 +0
android hermes x86 9,688,826 +0
android hermes x86_64 9,655,721 +0
android jsc arm64-v8a 10,880,195 +0
android jsc armeabi-v7a 9,783,936 +0
android jsc x86 10,920,336 +0
android jsc x86_64 11,528,751 +0

Base commit: 6daf5bb

@facebook-github-bot
Copy link
Contributor

@ShikaSD has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@Legion2 Legion2 changed the title use correct gradle packageTask use correct gradle packageTask and asserts dir for android libraries Aug 17, 2021
@Legion2 Legion2 force-pushed the fix-android-library-gradle-plugin branch from f7cfeab to 7f8348d Compare August 17, 2021 15:33
@facebook-github-bot
Copy link
Contributor

@cortinico has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

1 similar comment
@facebook-github-bot
Copy link
Contributor

@cortinico has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@cortinico cortinico self-requested a review August 23, 2021 17:52
@cortinico
Copy link
Contributor

Thank you for the fix @Legion2 The change looks good and should be merged soon 👍

@facebook-github-bot
Copy link
Contributor

@cortinico merged this pull request in 88f0676.

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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Android library builds broken after upgrade to 0.63
4 participants