From f6bd2c3615527c7540b5609347bdd2b66439341b Mon Sep 17 00:00:00 2001 From: Aleksandras Kostarevas Date: Tue, 5 Dec 2023 17:21:14 +0000 Subject: [PATCH] Add Proguard rules --- build.gradle | 4 +++- proguard-rules.pro | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 proguard-rules.pro diff --git a/build.gradle b/build.gradle index 68197e066..7353af102 100644 --- a/build.gradle +++ b/build.gradle @@ -67,7 +67,9 @@ android { signingConfig signingConfigs.debug } release { - proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard.flags' + minifyEnabled true + shrinkResources true + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' signingConfig releaseSigning } diff --git a/proguard-rules.pro b/proguard-rules.pro new file mode 100644 index 000000000..760eeecfb --- /dev/null +++ b/proguard-rules.pro @@ -0,0 +1,32 @@ +# Add project specific ProGuard rules here. +# You can control the set of applied configuration files using the +# proguardFiles setting in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Uncomment this to preserve the line number information for +# debugging stack traces. +-keepattributes SourceFile,LineNumberTable + +# If you keep the line number information, uncomment this to +# hide the original source file name. +#-renamesourcefileattribute SourceFile + +-keepclasseswithmembernames,includedescriptorclasses class * { + native ; +} + +-keepclasseswithmembers class * { + native ; +} + +-dontobfuscate +-optimizations !code/allocation/variable \ No newline at end of file