Skip to content

Add support for AAR files to IndexJar#1490

Open
pettermahlen wants to merge 2 commits into
bazel-contrib:masterfrom
pettermahlen:support-aar-package-extraction
Open

Add support for AAR files to IndexJar#1490
pettermahlen wants to merge 2 commits into
bazel-contrib:masterfrom
pettermahlen:support-aar-package-extraction

Conversation

@pettermahlen

Copy link
Copy Markdown

Fixes #1489

@shs96c shs96c left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This is a great change. Thank you! Would you mind just updating the test, and I'll merge it ASAP.

InputStream jarStream,
SortedSet<String> packages,
SortedMap<String, SortedSet<String>> serviceImplementations) throws IOException {
// Don't use try-with-resources here as we don't want to close the underlying stream

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thank you for the comment!

return jarBytes.toByteArray();
}

private byte[] createMinimalClassFileBytes() {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Since we know the implementation is looking at file names and not the bytes of the class, it's safe to just add the entry without the magic bytes. Could you please update the test?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Done!

@shs96c

shs96c commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator

@pettermahlen Could you please rebase and respond to the review comment, then I'll happily merge this

@pettermahlen
pettermahlen force-pushed the support-aar-package-extraction branch from 0bbd4f6 to fb13907 Compare June 15, 2026 15:15
@pettermahlen

Copy link
Copy Markdown
Author

Sorry, I completely dropped the ball on this one. It's been updated, let me know if it looks OK now or if further changes are needed!

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.

IndexJar fails to index .aar files

2 participants