# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in /Applications/Android Studio.app/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 *;
# start Intercom SDK Proguard rules
-keep class io.intercom.android.** { *; }
-keep class com.intercom.** { *; }

#Okio
-dontwarn org.codehaus.mojo.animal_sniffer.*
-dontwarn rx.**
-dontwarn io.intercom.okio.**

#Okhttp
-keepattributes *Annotation*
-keep class io.intercom.okhttp3.** { *; }
-keep interface io.intercom.okhttp3.** { *; }
-dontwarn io.intercom.okhttp3.**
-keepnames class io.intercom.okhttp3.internal.publicsuffix.PublicSuffixDatabase
-dontwarn io.intercom.okhttp3.internal.platform.ConscryptPlatform

#Retrofit
-dontwarn io.intercom.retrofit2.**
-keep class io.intercom.retrofit2.** { *; }
-keepattributes Exceptions
-keepattributes Signature, InnerClasses, EnclosingMethod
-keepattributes RuntimeVisibleAnnotations, RuntimeVisibleParameterAnnotations
-keepclassmembers,allowshrinking,allowobfuscation interface * {
     @io.intercom.retrofit2.http.* <methods>;
}
-dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
-dontwarn kotlin.Unit
-dontwarn io.intercom.retrofit2.KotlinExtensions
-dontwarn io.intercom.retrofit2.KotlinExtensions$*
-if interface * { @io.intercom.retrofit2.http.* <methods>; }
-keep,allowobfuscation interface <1>

#Otto
-keepclassmembers class ** {
    @io.intercom.com.squareup.otto.Subscribe public *;
    @io.intercom.com.squareup.otto.Produce public *;
}
# If we ever reduce the scope of the rules here, we need to keep this class as it has methods called only from Webviews
#-keepclassmembers class io.intercom.android.sdk.conversation.WebViewConversationContentPresenter.HostWrapper {
#   public *;
#}

# Fix warning about API 24 method used in HtmlCompat when using older build tools/compileSdkVersion
# https://github.com/intercom/intercom-android/issues/291#issuecomment-262886043
# TODO: Reproduce the issue and limit this rule to the HtmlCompat class
-dontwarn io.intercom.android.sdk.utilities.**

-keep public class * implements io.intercom.com.bumptech.glide.module.GlideModule

# We saw errors referencing com.shimmer.facebook.**.R in our app, we don't need to keep those references
-dontwarn com.facebook.shimmer.**

# end Intercom SDK Proguard rules
#}

-dontwarn javax.annotation.meta.**
-dontwarn javax.annotation.**

-dontwarn com.google.auto.**
