Fix: Android react.gradle VmCleanup when packaging as library#33179
Closed
nickfujita wants to merge 1 commit into
Closed
Fix: Android react.gradle VmCleanup when packaging as library#33179nickfujita wants to merge 1 commit into
nickfujita wants to merge 1 commit into
Conversation
|
Base commit: 8d50bf1 |
Base commit: 8d50bf1 |
cortinico
approved these changes
Feb 25, 2022
Contributor
|
@cortinico has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Collaborator
|
This pull request was successfully merged by @nickfujita in c34ef58. When will my fix make it into a release? | Upcoming Releases |
Saadnajmi
pushed a commit
to Saadnajmi/react-native-macos
that referenced
this pull request
Jan 15, 2023
…ok#33179) Summary: When packaging a react app as an android library with the enableVmCleanup flag not set to false, an error occurs since the "package${targetName}" task can not be found. This PR adds a simple null check, similar to what is being done for the sTask and mTask just below it to prevent the error. ## Changelog <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see: https://github.com/facebook/react-native/wiki/Changelog --> [Android] [Fixed] - Fixes android build error when compiling as library Pull Request resolved: facebook#33179 Test Plan: Compile project as library (com.android.library), and should not trigger and error with these changes. Would also like to have this fix cherry-pick'd to release 0.67 after merging. Reviewed By: ShikaSD Differential Revision: D34475934 Pulled By: cortinico fbshipit-source-id: ce6ce43960c4b388c4b1da49a9a6e21fd3bf8e16
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
When packaging a react app as an android library with the enableVmCleanup flag not set to false, an error occurs since the "package${targetName}" task can not be found. This PR adds a simple null check, similar to what is being done for the sTask and mTask just below it to prevent the error.
Changelog
[Android] [Fixed] - Fixes android build error when compiling as library
Test Plan
Compile project as library (com.android.library), and should not trigger and error with these changes.
Would also like to have this fix cherry-pick'd to release 0.67 after merging.