Skip to content

fix: add android r8 rules - #139

Merged
ovitrif merged 2 commits into
masterfrom
feat/r8-compat
Aug 26, 2026
Merged

fix: add android r8 rules#139
ovitrif merged 2 commits into
masterfrom
feat/r8-compat

Conversation

@ovitrif

@ovitrif ovitrif commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

Fixes #140

The Android AAR now ships targeted R8 consumer keep rules for the UniFFI/JNA FFI surface.

This is rebased on master after #138, at 0.5.9.

Description

  • Packages bindings/android/lib/consumer-rules.pro into the AAR as proguard.txt.
  • Keeps JNA Structure fields and constructors, Callback methods, and UniffiLib / IntegrityCheckingUniffiLib native method names in com.synonym.bitkitcore.
  • Fails bundleReleaseAar when those consumer keep rules are missing or empty.
  • Bumps the package to 0.5.9.

Preview

N/A — Android library packaging only.

QA Notes

Local verification: ./gradlew :lib:validateConsumerKeepRules :lib:bundleReleaseAar from bindings/android, then confirmed proguard.txt inside the release AAR.

@ovitrif
ovitrif marked this pull request as draft August 26, 2026 14:36
@ovitrif

ovitrif commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator Author

version bump won't work until this PR is merged and bindings are rebuilt:

@ovitrif ovitrif changed the title fix: ship Android R8 consumer keep rules fix: add android R8 consumer keep rules Aug 26, 2026
@ovitrif ovitrif changed the title fix: add android R8 consumer keep rules fix: add android R8 rules Aug 26, 2026
@ovitrif ovitrif changed the title fix: add android R8 rules fix: add android r8 rules Aug 26, 2026
Package targeted UniFFI/JNA keep rules in the AAR so consuming apps can enable R8 full mode without extra rules for this library.
@ovitrif
ovitrif marked this pull request as ready for review August 26, 2026 17:05
@ovitrif
ovitrif merged commit 657a386 into master Aug 26, 2026
@ovitrif
ovitrif deleted the feat/r8-compat branch August 26, 2026 17:05
@ovitrif
ovitrif requested review from ben-kaufman and removed request for jvsena42 August 26, 2026 19:10
@ovitrif

ovitrif commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator Author

@ben-kaufman or @coreyphillips pls do a review even though it's merged, my AI was feeling too lucky today

Comment thread bindings/android/lib/consumer-rules.pro
@ben-kaufman

Copy link
Copy Markdown
Collaborator

The 0.5.9 release symbols no longer match the published Android AAR. The manual run published the immutable Maven package, then the release run rebuilt and replaced native-debug-symbols.zip before its Maven publish failed with 409. All four ABI build IDs differ. Could we restore the symbols from run 32992320812 and update the workflow so the AAR and symbols always come from one successful build?

@ovitrif

ovitrif commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator Author

Addressed the review concerns in:

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.

add android r8 consumer keep rules

2 participants