Add Proguard rules

This commit is contained in:
Aleksandras Kostarevas 2023-12-05 17:21:14 +00:00
parent 7075c22179
commit f6bd2c3615
2 changed files with 35 additions and 1 deletions

View File

@ -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
}

32
proguard-rules.pro vendored Normal file
View File

@ -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 <methods>;
}
-keepclasseswithmembers class * {
native <methods>;
}
-dontobfuscate
-optimizations !code/allocation/variable