Minimal AGP app that consumes the net.ladenthin:llama-android AAR from mavenLocal.
Not a shipped project — it exists so CI proves Android Studio consumption end to end.
Two CI jobs drive it (.github/workflows/publish.yml):
package-android-aar—assembleReleasewith R8 for both-PjllamaBackend=cpu(the default) and-PjllamaBackend=opencl. The latter declares only the OpenCL dependency and resolves the CPU AAR transitively, catching duplicate classes between the two AARs. Validates AAR format, manifest minSdk merge,jni/{arm64-v8a,x86_64}packaging, and the shipped consumer ProGuard rules (asserts the APK still carries the binding and, per ABI,libjllama.so, ggml's shared libraries and at least onelibggml-cpu-*.somodule).test-android-emulator— boots a KVM-accelerated x86_64 emulator, adb-pushes a small GGUF (the already-cached draft model) to/data/local/tmp/jllama-test-model.gguf, and runsconnectedDebugAndroidTest:OnDeviceInferenceTestloads the binding viaSystem.loadLibraryfrom the AAR'sjni/x86_64/libjllama.so, reads the GGUF with the pure-JavaGgufInspector, and runs real native inference on the emulator. Tests self-skip when the model was not pushed, so a localconnectedAndroidTestagainst a bare emulator stays green.
What the emulator job deliberately does NOT cover: arm64 kernels (real-device ABI — the example app on hardware covers that) and Adreno/OpenCL execution (no OpenCL ICD in the emulator). OpenCL dependency resolution, R8 and APK packaging are covered by the first job.