Skip to content

fix(bgp): package local jars of embedded libraries into the AAR - #512

Merged
hurali97 merged 2 commits into
callstack:mainfrom
KisaneNeko:fix/bgp-aar-local-jars
Nov 2, 2026
Merged

hurali97 merged 2 commits into
callstack:mainfrom
KisaneNeko:fix/bgp-aar-local-jars

Conversation

@KisaneNeko

@KisaneNeko KisaneNeko commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Refs #489

Problem

Classes from a library's local jars (implementation files("libs/x.jar")) are missing from the brownfield AAR, so the host app crashes with NoClassDefFoundError. They were merged only for minified builds, and #417 dropped even that: MergeClassesTask only receives each library's classes.jar.

Change

Verified with a local RN library that ships a jar in android/libs: on main the class is missing from the AAR, with the change the consumer AndroidApp calls it at startup and Detox E2E passes for vanilla, Expo 58 and Expo 57.

Apps that already have those classes, because they added the jar themselves or depend on a library the jar bundles, now fail with duplicate classes and need to remove their copy (also in the changeset).

Not covered

callstack#417 dropped the merge of classes from each library's libs/*.jar (it
only ran for minified builds before), so host apps crashed with
NoClassDefFoundError. Merge them in every variant, leaving out the
jar's root module-info.class.

Refs callstack#489

@hurali97 hurali97 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

🚀

@hurali97
hurali97 merged commit 520811c into callstack:main Nov 2, 2026
14 checks passed
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.

2 participants