Publish Android JNI libraries as JVM client classifiers - #689
Conversation
Added tasks to collect and publish Android JNI libraries for JVM.
|
What's the motivation here? What happens to the existing Android-specific JVM classes? |
|
The motivation is that "signal-cli" on Termux runs as a plain JVM app, but on Android it still needs the Android-built This PR doesn't change the Android packaging. It only adds the Android JNI The existing Android-specific JVM classes aren't touched. They remain in the Android library/AAR, and So Android apps keep using I've also verified this end-to-end with signal-cli on Termux (AsamK/signal-cli#2106), including build, registration, verification, and successfully sending a message. |
Summary
Add Android JNI libraries as classifier artifacts to the existing
libsignal-clientJVM publication.The normal
libsignal-clientJAR remains unchanged and continues to provide the Java API. Android JNI libraries are published separately as architecture-specific classifier JARs containing onlylibsignal_jni.so.Published artifacts
For each Android ABI, the JVM client publication additionally produces:
Each classifier JAR contains:
The classifier artifacts are therefore usable independently from the normal JVM artifact while avoiding changes to the existing desktop JNI packaging.
Implementation
The
:clientpublication now:mavenJavapublication.The existing desktop JNI artifacts and normal
libsignal-clientJAR are unchanged.Validation
The implementation was verified with the complete Android JNI build:
The resulting local Maven publication contains:
The classifier JARs were inspected and each contains exactly:
The publication was successfully built and published to Maven Local.
Consumer model
The intended consumer model is:
The normal artifact remains responsible for the Java classes; the classifier artifact supplies the platform-specific JNI library.
Notes
This change intentionally does not introduce Android platform detection or modify consumers. Consumer-side selection of the appropriate classifier is handled separately.