#1813 Cleanup proguard rules. Use optimized default proguard rules.

This commit is contained in:
sictiru 2023-09-25 13:10:11 -07:00
parent 458ab145f5
commit ae720e9947
2 changed files with 1 additions and 39 deletions

View file

@ -1,47 +1,9 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.kts.
#
# 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
-dontobfuscate
-printusage
-keepattributes Exceptions,InnerClasses,Signature
-keepattributes *Annotation*
-dontwarn okio.**
-dontnote okio.**
-keep class okhttp3.** { *; }
-keep interface okhttp3.** { *; }
-dontwarn okhttp3.**
-dontnote okhttp3.**
# these two seem to confuse ProGuard, so force keep them
-keep class com.newsblur.util.StateFilter { *; }
-keep class com.newsblur.view.StateToggleButton$StateChangedListener { *; }
# we use proguard only as an APK shrinker and many of our dependencies throw
# all manner of gross warnings. kept silent by default, the following lines
# can be commented out to help diagnose shrinkage errors.
-dontwarn **
-dontnote **
# Gson uses generic type information stored in a class file when working with fields. Proguard
# removes such information by default, so configure it to keep all of it.
-keepattributes Signature

View file

@ -11,5 +11,5 @@ object Const {
const val benchmarkProguard = "benchmark-rules.pro"
const val appProguard = "proguard-rules.pro"
const val defaultProguard = "proguard-android.txt"
const val defaultProguard = "proguard-android-optimize.txt"
}