Cherrypick for 4.2.0: Support extracting aar files. #13768
Merged
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.
@katre, any chance this one could still go into 4.2.0 (#13558)?
It's a cherrypick of 9055c67.
This is handy, though not essential, for manipulating Android aars in repository rules. It only slightly generalizes an existing interface, without changing or removing any existing functionality.
Original commit message below:
Hey awesome Bazel team,
Would you consider allowing extract, download_and_extract, and http_archive to decompress .aar android archives? Figured I'd just toss up a PR to ask because it was such an easy addition; aars are just zip files under the hood, totally parallel to the jar/war cases already in the codebase.
The motivation is that you'll need this basic functionality to be able to depend on the native interface of an aar, which Android Studio & co are working on in prefabs. I ran into the lack of support while trying to hack myself support for #13092.
Thanks for your consideration!
Chris
Closes #13098.
PiperOrigin-RevId: 387384152