Cherrypick for 4.2.0: Export proguard specs from aar_import#13705
Merged
katre merged 1 commit intobazelbuild:release-4.2.0-patchesfrom Jul 19, 2021
cpsauer:fix-aar-proguard-4.2
Merged
Cherrypick for 4.2.0: Export proguard specs from aar_import#13705katre merged 1 commit intobazelbuild:release-4.2.0-patchesfrom cpsauer:fix-aar-proguard-4.2
katre merged 1 commit intobazelbuild:release-4.2.0-patchesfrom
cpsauer:fix-aar-proguard-4.2
Conversation
**Background** #3778 proguard specs from the `aar_import` rule do not get bubbled up to `android_binary`. In this PR, I wire up a `ProguardSpecProvider` from this rule that exports the `proguard.txt` within an AAR if it exists and any transitive proguard specs from the `exports` attribute. **Changes** * Add an `aar_embedded_proguard_extractor` script to extract `proguard.txt` from an AAR if it exists otherwise generate an empty proguard specs file * In AarImport, wire up the proguard extractor action and export results through a `ProguardSpecProvider`. Once this lands, the android rules would need to be bumped. **Test Plan** * Added tests for the extraction python script * Added tests for the `aar_import` rule changes Closes #12749. PiperOrigin-RevId: 359667674
Contributor
Author
|
I don't have the permissions to assign, but this cherrypick should go to @katre, per #13558 (comment) |
katre
approved these changes
Jul 19, 2021
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.
Cherrypick of c8c0d94 for 4.2.0 (#13558).
Without this bug fix, using the proguard feature subtly breaks a wide range of android dependencies, including official ones from Google.
Original commit message below:
Background
#3778
proguard specs from the
aar_importrule do not get bubbled up toandroid_binary. In this PR, I wire up aProguardSpecProviderfrom this rule that exports theproguard.txtwithin an AAR if it exists and any transitive proguard specs from theexportsattribute.Changes
aar_embedded_proguard_extractorscript to extractproguard.txtfrom an AAR if it exists otherwise generate an empty proguard specs fileProguardSpecProvider.Once this lands, the android rules would need to be bumped.
Test Plan
aar_importrule changesCloses #12749.
PiperOrigin-RevId: 359667674