# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in /Users/angelocoiro/Library/Android/sdk/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
# For more details, see
#   http://developer.android.com/guide/developing/tools/proguard.html

# Add any project specific keep options here:

# 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 *;
#}


##---------------Begin: proguard configuration for Gson  ----------
# 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

# For using GSON @Expose annotation
-keepattributes *Annotation*

# Gson specific classes
-keep class sun.misc.Unsafe { *; }
#-keep class com.google.gson.stream.** { *; }

-keepclasseswithmembers class * {
  @com.google.gson.annotations.SerializedName <fields>;
}

# Prevent proguard from stripping interface information from TypeAdapterFactory,
# JsonSerializer, JsonDeserializer instances (so they can be used in @JsonAdapter)
-keep class * implements com.google.gson.TypeAdapterFactory
-keep class * implements com.google.gson.JsonSerializer
-keep class * implements com.google.gson.JsonDeserializer

##---------------End: proguard configuration for Gson  ----------


##---------------Beginning: proguard configuration for Retrofit 2  ----------
-dontwarn okio.**
-dontwarn retrofit2.Platform$Java8
-dontwarn sun.misc.Unsafe
-dontwarn org.w3c.dom.bootstrap.DOMImplementationRegistry
-dontwarn retrofit2.**
-keep class retrofit2.** { *; }
-keepattributes Signature
-keepattributes Exceptions
-keepclassmembers class rx.internal.util.unsafe.** {
    long producerIndex;
    long consumerIndex;
}

-keepclasseswithmembers class * {
    @retrofit2.http.* <methods>;
}
-keep class com.google.gson.** { *; }
-keep class com.google.inject.** { *; }
##---------------End: proguard configuration for Retrofit 2  ----------

##---------------Begin: Joda Time Configuration -------##
-dontwarn org.joda.convert.**
-dontwarn org.joda.time.**
##---------------End: Joda Time Configuration -------##


##---------------Begin: proguard Configuration for generic library -------##

-keepparameternames
-renamesourcefileattribute SourceFile
-keepattributes Exceptions,InnerClasses,Signature,Deprecated,SourceFile,LineNumberTable,*Annotation*,EnclosingMethod

##-keep public class * { *; }
-keep public class com.geouniq.android.** { *; }

#-keepnames interfaces

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

-keepclasseswithmembernames,includedescriptorclasses class * {
    native <methods>;
}

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

-keepclassmembers enum * { *; }

-keepclassmembers class * implements java.io.Serializable {
    static final long serialVersionUID;
    private 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();
}
##---------------End: proguard Configuration for generic library -------##


##---------------Begin: custom Configuration -------##
# Application classes that will be serialized/deserialized over Gson
-keep class com.geouniq.android.** implements com.geouniq.android.ISerializable {*;}

# Application classes that will be serialized/deserialized over Gson for reflection
-keep class com.geouniq.android.** implements com.geouniq.android.IReflectionable {*;}

#-keep class * extends android.app.Activity{}
-keep class com.geouniq.android.** extends android.app.Activity{}

-keepclassmembers class * extends androidx.lifecycle.EmptyActivityLifecycleCallbacks { *; }

-keepclassmembers class androidx.lifecycle.ReportFragment$** { *; }

-keepclassmembers class android.arch.lifecycle.ReportFragment$** { *; }

-ignorewarnings
##---------------End: custom Configuration -------##