Cherrypick for 4.2.0: Export proguard specs from aar_import #13705
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_import
rule do not get bubbled up toandroid_binary
. In this PR, I wire up aProguardSpecProvider
from this rule that exports theproguard.txt
within an AAR if it exists and any transitive proguard specs from theexports
attribute.Changes
aar_embedded_proguard_extractor
script to extractproguard.txt
from 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_import
rule changesCloses #12749.
PiperOrigin-RevId: 359667674