|
- -allowaccessmodification
- -dontpreverify
- -dontusemixedcaseclassnames
- -dontskipnonpubliclibraryclasses
- -verbose
-
- -keepclasseswithmembernames class * {
- native <methods>;
- }
-
- -keepclassmembers enum * {
- public static **[] values();
- public static ** valueOf(java.lang.String);
- }
-
- -keepclassmembers class * implements android.os.Parcelable {
- public static final ** CREATOR;
- }
-
- -keep class androidx.annotation.Keep
-
- -keep @androidx.annotation.Keep class * {*;}
-
- -keepclasseswithmembers class * {
- @androidx.annotation.Keep <methods>;
- }
-
- -keepclasseswithmembers class * {
- @androidx.annotation.Keep <fields>;
- }
-
- -keepclasseswithmembers class * {
- @androidx.annotation.Keep <init>(...);
- }
-
- ##---------------Begin: proguard configuration for Gson and Retrofit ----------
- # based on:
- # https://github.com/google/gson/blob/master/examples/android-proguard-example/proguard.cfg
- # https://github.com/square/retrofit/blob/master/retrofit/src/main/resources/META-INF/proguard/retrofit2.pro
-
-
- # 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.
- # Retrofit does reflection on generic parameters. InnerClasses is required to use Signature and
- # EnclosingMethod is required to use InnerClasses.
- -keepattributes Signature, InnerClasses, EnclosingMethod
-
- # For using GSON @Expose annotation
- # Retrofit does reflection on method and parameter annotations.
- -keepattributes *Annotation*
-
- # Application classes that will be serialized/deserialized over Gson
- -keep class com.getbubblenow.android.model.* { <fields>; }
-
- # Prevent proguard from stripping interface information from TypeAdapter, TypeAdapterFactory,
- # JsonSerializer, JsonDeserializer instances (so they can be used in @JsonAdapter)
- -keep class * extends com.google.gson.TypeAdapter
- -keep class * implements com.google.gson.TypeAdapterFactory
- -keep class * implements com.google.gson.JsonSerializer
- -keep class * implements com.google.gson.JsonDeserializer
-
- # Prevent R8 from leaving Data object members always null
- -keepclassmembers,allowobfuscation class * {
- @com.google.gson.annotations.SerializedName <fields>;
- }
-
- # Retain service method parameters when optimizing.
- -keepclassmembers,allowshrinking,allowobfuscation interface * {
- @retrofit2.http.* <methods>;
- }
-
- # With R8 full mode, it sees no subtypes of Retrofit interfaces since they are created with a Proxy
- # and replaces all potential values with null. Explicitly keeping the interfaces prevents this.
- -if interface * { @retrofit2.http.* <methods>; }
- -keep,allowobfuscation interface <1>
-
- # Gson specific classes
- -dontwarn sun.misc.**
-
- # Ignore annotation used for build tooling.
- -dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
-
- # Ignore JSR 305 annotations for embedding nullability information.
- -dontwarn javax.annotation.**
-
- # Guarded by a NoClassDefFoundError try/catch and only used when on the classpath.
- -dontwarn kotlin.Unit
-
- # Top-level functions that can only be used by Kotlin.
- -dontwarn retrofit2.KotlinExtensions
- -dontwarn retrofit2.KotlinExtensions$*
-
- ##---------------End: proguard configuration for Gson and Retrofit ----------
|