Goal: release builds shrink code and resources with R8.
App
- Set
isMinifyEnabled = true on the release build type.
- Set
isShrinkResources = true on the release build type.
- Keep JNI native method names and their descriptor classes in
app/proguard-rules.pro.
- Set the Kotlin compiler flag
-Xannotation-default-target=param-property.
Libraries
Each consumed UniFFI Android AAR ships targeted R8 consumer keep rules so R8 full mode keeps JNA Structure fields, Callback methods, and the UniFFI JNA library symbols.
Acceptance
- A minified release build installs and runs code from the rust libs without runtime crashes.
- Each consumed UniFFI AAR contributes a non-empty
proguard.txt to that build.
Goal: release builds shrink code and resources with R8.
App
isMinifyEnabled = trueon the release build type.isShrinkResources = trueon the release build type.app/proguard-rules.pro.-Xannotation-default-target=param-property.Libraries
Each consumed UniFFI Android AAR ships targeted R8 consumer keep rules so R8 full mode keeps JNA
Structurefields,Callbackmethods, and the UniFFI JNA library symbols.Acceptance
proguard.txtto that build.