Skip to content

fix: add android r8 rules - #106

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

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

Conversation

@ovitrif

@ovitrif ovitrif commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

Fixes #105

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

These rules are packaged as proguard.txt and apply automatically when a consuming app enables R8.

Description

  • Packages bindings/kotlin/ldk-node-android/lib/consumer-rules.pro into the AAR as proguard.txt.
  • Keeps the UniFFI 0.28 / JNA FFI surface in org.lightningdevkit.ldknode:
    • JNA Structure fields and constructors
    • JNA Callback methods
    • UniffiLib interface method names used by Native.load
  • Fails bundleReleaseAar when those consumer keep rules are missing or empty.

Preview

N/A — Android library packaging only.

QA Notes

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

Keep rules follow synonymdev/bitkit-core#139 for this crate's UniFFI 0.28 Native.load surface.

Package targeted UniFFI 0.28 / JNA consumer keep rules into the
ldk-node-android AAR as proguard.txt, and fail bundleReleaseAar when
those rules are missing or empty.
@ovitrif
ovitrif marked this pull request as ready for review August 26, 2026 17:06
@ovitrif
ovitrif merged commit 5e65861 into main Aug 26, 2026
@ovitrif
ovitrif deleted the feat/r8-compat branch August 26, 2026 17:06
@ovitrif ovitrif changed the title fix: ship Android R8 consumer keep rules fix: add android r8 rules Aug 26, 2026
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

1 participant