From 588a52ca8fdbce5ecde3aa8b8f626e9eece483a6 Mon Sep 17 00:00:00 2001 From: Tom Cooks Date: Sun, 11 Oct 2026 12:23:04 -0400 Subject: Enable R8 minification and resource shrinking --- app/proguard-rules.pro | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'app/proguard-rules.pro') diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro index d11f58e..bdbdae3 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -1,2 +1,16 @@ # Add project specific ProGuard rules here. -keepattributes SourceFile,LineNumberTable + +# sherpa-onnx's Kotlin API is invoked from the native libraries through JNI, so +# nothing in that package may be renamed or removed. +-keep class com.k2fsa.sherpa.onnx.** { *; } +-keepclasseswithmembernames class * { + native ; +} + +# Custom views are instantiated by the layout inflater via reflection. +-keep public class * extends android.view.View { + public (android.content.Context); + public (android.content.Context, android.util.AttributeSet); + public (android.content.Context, android.util.AttributeSet, int); +} -- cgit v1.2.3