#-printmapping out.map
-keepattributes Exceptions,InnerClasses,Signature,Deprecated,
                SourceFile,LineNumberTable,*Annotation*,EnclosingMethod
# Gson specific classes
-dontwarn sun.misc.**
# Application classes that will be serialized/deserialized over Gson
-keepnames class com.helpcrunch.library.repository.models** { <fields>; }
# Keep main HelpCrunch classes
-keep,allowoptimization class com.helpcrunch.library.core.HelpCrunch { public *;}
-keep,allowoptimization class com.helpcrunch.library.core.Callback { public *; }
-keep,allowoptimization class com.helpcrunch.library.core.HelpCrunchExt { public *; }
-keep,allowoptimization class com.helpcrunch.library.core.options** { public *;}
-keep,allowoptimization class com.helpcrunch.library.core.models** { *;}
-keep,allowoptimization class com.helpcrunch.library.repository.Repository { *;}
-keep class com.helpcrunch.library.repository.models.remote.** { *;}
-keep class com.helpcrunch.library.core.HelpCrunchErrors { public *;}
-keepnames class com.helpcrunch.library.repository.models.remote.application.** { *; }
-keep class com.helpcrunch.library.repository.remote.api.Api { *; }

# Preserve the special static methods that are required in all enumeration
# classes.
-keep public class com.helpcrunch.library.core.HelpCrunch$** {
     **[] $VALUES;
       public *;
}

-keepclassmembers enum * {
    public static **[] values();
    public static ** valueOf(java.lang.String);
}

# Prevent proguard from stripping interface information from TypeAdapter, TypeAdapterFactory,
# JsonSerializer, JsonDeserializer instances (so they can be used in @JsonAdapter)
-keep class * implements 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>;
}

-keepclassmembernames class * {
    java.lang.Class class$(java.lang.String);
    java.lang.Class class$(java.lang.String, boolean);
}

# Retrofit
-dontwarn retrofit2.**
-dontwarn org.codehaus.mojo.**
-keep class retrofit2.** { *; }
-keepattributes Signature
-keepattributes Exceptions
-keepattributes *Annotation*

-keepattributes RuntimeVisibleAnnotations
-keepattributes RuntimeInvisibleAnnotations
-keepattributes RuntimeVisibleParameterAnnotations
-keepattributes RuntimeInvisibleParameterAnnotations

-keepattributes EnclosingMethod

-keepclasseswithmembers class * {
    @retrofit2.* <methods>;
}

-keepclasseswithmembers interface * {
    @retrofit2.* <methods>;
}
# Platform calls Class.forName on types which do not exist on Android to determine platform.
-dontnote retrofit2.Platform
# Platform used when running on RoboVM on iOS. Will not be used at runtime.
-dontnote retrofit2.Platform$IOS$MainThreadExecutor
# Platform used when running on Java 8 VMs. Will not be used at runtime.
-dontwarn retrofit2.Platform$Java8
# Retain generic type information for use by reflection by converters and adapters.
-keepattributes Signature
# Retain declared checked exceptions for use by a Proxy instance.
-keepattributes Exceptions
# Explicitly preserve all serialization members. The Serializable interface
# is only a marker interface, so it wouldn't save them.
# You can comment this out if your library doesn't use serialization.
# If your code contains serializable classes that have to be backward
# compatible, please refer to the manual.

-keepclassmembers class * implements java.io.Serializable {
    static final long serialVersionUID;
    static final java.io.ObjectStreamField[] serialPersistentFields;
    private void writeObject(java.io.ObjectOutputStream);
    private void readObject(java.io.ObjectInputStream);
    java.lang.Object writeReplace();
    java.lang.Object readResolve();
}

-keepclassmembers class * implements android.os.Parcelable

-keep class com.helpcrunch.library.repository.models.LoadingState { *;}
-keepclassmembers class com.helpcrunch.library.repository.models.LoadingState { *;}

-keepclassmembers class * { public <init>(...); }
-keep public class * extends androidx.recyclerview.widget.RecyclerView$RecycledViewPool
-keep class androidx.recyclerview.widget.RecyclerView

-dontwarn androidx.paging.PositionalDataSource