# ------------------- #
# --- Description --- #
# ------------------- #
# This file describes Proguard rules that Taboola SDKz require.

###---------- Begin: proguard configuration for Taboola SDK ----------
-dontwarn com.taboola.android.api.**
-dontwarn com.google.gson.annotations.**
-keepnames class com.taboola.android.integration_verifier.testing.tests.proguard_stub.ProguardVerificationStub
###---------- End:   proguard configuration for Taboola SDK ----------

#### All of the rules below are for Taboola API dependencies. You don't have to modify them ####

###--------------- 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
-dontwarn sun.misc.**
-keep public class com.google.gson.** {*;}

-keepattributes EnclosingMethod

# Application classes that will be serialized/deserialized over Gson
-keep class com.google.gson.examples.android.model.** { *; }

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

###--------------- Begin: proguard configuration for Picasso ----------
-keep interface com.squareup.picasso.Callback {*;}

###--------------- End: proguard configuration for Picasso ------

###--------------- Begin: proguard configuration for OkHttp ----------
-dontwarn com.squareup.okhttp.**
-dontwarn okio.**
-dontwarn org.conscrypt.**
-keep class org.conscrypt.** { *; }

# Animal Sniffer compileOnly dependency to ensure APIs are compatible with older versions of Java.
-dontwarn org.codehaus.mojo.animal_sniffer.*

# JSR 305 annotations are for embedding nullability information.
-dontwarn javax.annotation.**

# A resource is loaded with a relative path so the package of this class must be preserved.
-keepnames class okhttp3.internal.publicsuffix.PublicSuffixDatabase

# OkHttp platform used only on JVM and when Conscrypt dependency is available.
-dontwarn okhttp3.internal.platform.ConscryptPlatform

###--------------- End: proguard configuration for OkHttp ------

###---------------- Begin: proguard configuration for LightNetwork ------
# keep everything in this package from being removed or renamed
-keep class com.taboola.lightnetwork.** { *; }

##---------------- End: proguard configuration for LightNetwork ------

###--------------- Begin: proguard configuration for sdk swapper ------
-keep class android.support.** {*;}

###--------------- End: proguard configuration for sdk swapper ------

###--------------- Begin: proguard configuration for integration verifier ------
#Keep entire verifier package for testing
-keep class com.taboola.android.integration_verifier.** {*;}

###--------------- End: proguard configuration for integration verifier ------