1# Keep the attributes that contain annotations. 2-keepattributes RuntimeVisible*Annotation* 3 4# @UsedByNative should be used to annotate things referenced from name by JNI. 5# This includes external methods in the Kotlin code and classes whose type 6# is referenced by name in JNI C++ code, as well as any method that is looked 7# up by name. 8-if class androidx.ink.nativeloader.NativeLoader 9-keep class androidx.ink.nativeloader.UsedByNative 10 11# Keep annotated class names. 12-if class androidx.ink.nativeloader.NativeLoader 13-keepnames @androidx.ink.nativeloader.UsedByNative class * { 14 <init>(); 15} 16 17# Keep annotated class members if the class is kept. This is preserved not only 18# from renaming but also from pruning, since some of the annotated methods may 19# only be used as callbacks from native code. 20-if class androidx.ink.nativeloader.NativeLoader 21-keepclassmembers class * { 22 @androidx.ink.nativeloader.UsedByNative *; 23} 24