fix: android consumer-rules - #107
Conversation
R8 full mode stripped @structure.FieldOrder from UniFFI structs. Keep the annotation type and annotated classes so JNA can still lay out the structs.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b333b30b79
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| @@ -1,5 +1,6 @@ | |||
| # Unreleased | |||
|
|
|||
| - Android consumer keep rules now keep the JNA `Structure.FieldOrder` annotation type and annotated UniFFI struct classes through R8 full mode. | |||
There was a problem hiding this comment.
Move the entry into Synonym Fork Additions
This new Synonym-fork change is recorded under # Unreleased, but the repository requires all fork additions to remain in the single cumulative ## Synonym Fork Additions subsection, with new entries added at the top. Leaving it here fragments the release history and excludes the fix from the mandated cumulative section.
AGENTS.md reference: AGENTS.md:L257-L263
Useful? React with 👍 / 👎.
Ship FieldOrder and com.sun.jna.* keeps in the AAR. Library publish packages proguard.txt so a minified app can resolve JNI names and lay out JNA structs.
Fixes #105
Follow-up to #106.
The Android AAR ships consumer keep rules for UniFFI/JNA so a minified app can resolve JNI names and lay out JNA structs.
Library publish packages
proguard.txtin the AAR. Minified-app R8 belongs in the consuming app.Description
com.sun.jna.*solibjnidispatchcan resolve JNI names onNative,Structure, andCallbackReference.com.sun.jna.*, includingcom.sun.jna.ptrByReference types used as UniFFI callback out-params.com.sun.jna.Structure$FieldOrderand annotatedorg.lightningdevkit.ldknodestruct classes, fields, and constructors.bundleReleaseAarwhen the AAR is missing a non-emptyproguard.txt.Out of scope
Preview
N/A — Android consumer keep rules only.
QA Notes
proguard.txtwith those consumer keep rules.