diff options
| -rw-r--r-- | app/build.gradle.kts | 3 | ||||
| -rw-r--r-- | app/proguard-rules.pro | 14 |
2 files changed, 16 insertions, 1 deletions
diff --git a/app/build.gradle.kts b/app/build.gradle.kts index eb0bacd..835ff7e 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -30,7 +30,8 @@ android { isMinifyEnabled = false } release { - isMinifyEnabled = false + isMinifyEnabled = true + isShrinkResources = true // Do not embed META-INF/version-control-info (the git revision): it is // the only difference between our build and F-Droid's reproducible // rebuild, which otherwise fail to match. 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 <methods>; +} + +# Custom views are instantiated by the layout inflater via reflection. +-keep public class * extends android.view.View { + public <init>(android.content.Context); + public <init>(android.content.Context, android.util.AttributeSet); + public <init>(android.content.Context, android.util.AttributeSet, int); +} |
