From f89d82d1b7cbb46621c0ce7b29b5e0de7b2fab6b Mon Sep 17 00:00:00 2001 From: Konrad Pozniak Date: Thu, 4 Jun 2020 20:17:07 +0200 Subject: [PATCH] cleanup proguard rules (#1819) --- app/proguard-rules.pro | 46 ++++++------------------------------------ 1 file changed, 6 insertions(+), 40 deletions(-) diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro index 2d554c99..e25a4564 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -17,12 +17,12 @@ # keep setters in Views so that animations can still work. # see http://proguard.sourceforge.net/manual/examples.html#beans -keepclassmembers public class * extends android.view.View { - void set*(***); - *** get*(); + void set*(***); + *** get*(); } # We want to keep methods in Activity that could be used in the XML attribute onClick -keepclassmembers class * extends android.app.Activity { - public void *(android.view.View); + public void *(android.view.View); } # For enumeration classes, see http://proguard.sourceforge.net/manual/examples.html#enumerations -keepclassmembers enum * { @@ -30,43 +30,19 @@ public static ** valueOf(java.lang.String); } -keepclassmembers class * implements android.os.Parcelable { - public static final android.os.Parcelable$Creator CREATOR; -} --keepclassmembers class **.R$* { - public static ; + public static final ** CREATOR; } # TUSKY SPECIFIC OPTIONS -## for okhttp --dontwarn javax.annotation.** --keepnames class okhttp3.internal.publicsuffix.PublicSuffixDatabase --dontwarn org.codehaus.mojo.animal_sniffer.* --dontwarn okhttp3.internal.platform.ConscryptPlatform - -##for keep --dontwarn android.arch.util.paging.CountedDataSource --dontwarn android.arch.persistence.room.paging.LimitOffsetDataSource - -## for retrofit --dontwarn retrofit2.** --keep class retrofit2.** { *; } --keepattributes Signature --keepattributes Exceptions --keepattributes *Annotation* - --keepclasseswithmembers class * { - @retrofit2.http.* ; -} - --keep class com.keylesspalace.tusky.entity.** { *; } +# keep members of our model classes, they are used in json de/serialization +-keepclassmembers class com.keylesspalace.tusky.entity.* { *; } -keep public enum com.keylesspalace.tusky.entity.*$** { **[] $VALUES; public *; } - # preserve line numbers for crash reporting -keepattributes SourceFile,LineNumberTable -renamesourcefileattribute SourceFile @@ -87,17 +63,7 @@ static void throwUninitializedPropertyAccessException(java.lang.String); } --dontwarn com.google.errorprone.annotations.* - # without this emoji font downloading fails with AbstractMethodError -keep class * extends android.os.AsyncTask { public *; } - -# Glide --keep public class * implements com.bumptech.glide.module.GlideModule --keep public class * extends com.bumptech.glide.module.AppGlideModule --keep public enum com.bumptech.glide.load.ImageHeaderParser$** { - **[] $VALUES; - public *; -}