#Optimizations
# from ANDROID_SDK/tools/proguard/proguard-android-optimize.txt
# "!code/allocation/variable" is required, if not cause error 'Unable to compute hash'
-optimizations !field/removal/writeonly,!field/marking/private,!class/merging/*,!code/allocation/variable
-optimizations !code/simplification/arithmetic,!code/simplification/cast,!class/merging/*,!field/*,!code/allocation/variable
#-dontskipnonpubliclibraryclassmembers

# log files
#-dump proguard_class_files.txt
#-printseeds proguard_seeds.txt
#-printusage proguard_unused.txt
#-printmapping proguard_mapping.txt

# Keep the source file and line number table so we get decipherable stack traces -->
#-renamesourcefileattribute SourceFile
-keepattributes SourceFile, LineNumberTable

#okhttp3
-dontwarn okhttp3.**
-dontwarn okio.**
-dontwarn javax.annotation.**
-dontwarn org.conscrypt.**
# A resource is loaded with a relative path so the package of this class must be preserved.
-keepnames class okhttp3.internal.publicsuffix.PublicSuffixDatabase
-dontwarn okhttp3.internal.platform.*

# Keep app classes
-keep public class com.appzilo.sdk.video.AppziloVideo  { public protected *; }
-keep public class com.appzilo.sdk.video.backend.model.**  { *; }

-keep class com.appzilo.sdk.video.** { *; }
-dontwarn com.appilo.**
-dontwarn com.squareup.okhttp.**
-keeppackagenames

#CookiePersistence
-dontwarn com.franmontiel.persistentcookiejar.**
-keep class com.franmontiel.persistentcookiejar.**
-keepclassmembers class * implements java.io.Serializable {
    static final long serialVersionUID;
    private static final java.io.ObjectStreamField[] serialPersistentFields;
    !static !transient <fields>;
    private void writeObject(java.io.ObjectOutputStream);
    private void readObject(java.io.ObjectInputStream);
    java.lang.Object writeReplace();
    java.lang.Object readResolve();
}

##---------------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

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

# Application classes that will be serialized/deserialized over Gson
# -keep class mypersonalclass.data.model.** { *; }

-dontwarn android.support.v7.**
-keep class android.support.v7.** { *; }
-keep interface android.support.v7.** { *; }

#roundcornerprogressbar (https://github.com/akexorcist/Android-RoundCornerProgressBar/issues/43)
-dontwarn com.akexorcist.roundcornerprogressbar.TextRoundCornerProgressBar