Skip to content

Conversation

@Bencodes
Copy link
Owner

@Bencodes Bencodes commented Jan 30, 2025

The latest release of rules_android no longer exports the transitive aar imports as part of the provider. To work around this limitation, and to preserve the existing behavior, I've updated the aspect to collect the transitive aar artifacts in a way that reflects the previous behavior of the upstream provider.

In addition I broke out the AAR unpacking into a genrule which should hopefully improve performance overall by allowing Bazel to manage those actions instead of doing them inside the action.

@Bencodes Bencodes force-pushed the fix-aar-support-and-move-the-unpacking-out-of-the-wrapper branch from 54e9102 to 4597556 Compare January 30, 2025 18:31
Copy link
Contributor

@kateliu20 kateliu20 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 👍


direct_aars = None
if hasattr(ctx.rule.attr, "aar"):
# Collect the direct arr artifact for the given target
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! just small nit here for the spelling

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch, updated!

@Bencodes Bencodes merged commit 69b4df5 into main Jan 31, 2025
7 checks passed
@Bencodes Bencodes deleted the fix-aar-support-and-move-the-unpacking-out-of-the-wrapper branch January 31, 2025 17:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants