# These proguard rules will be merged into proguard-rules for apps that use obfuscation automatically.

## okio is a dependency of okhttp
-dontwarn okio.**
## okhttp 3.8 and up needs these
-dontwarn javax.annotation.Nullable
-dontwarn javax.annotation.ParametersAreNonnullByDefault

# SDK 22 and lower, but just to be sure
-dontwarn com.inbeacon.sdk.**

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

# keep payloads that @Expose attributes
-keep public class com.inbeacon.sdk.** {
     @com.google.gson.annotations.Expose *;
}

# Also keep classes that @Expose everything
-keep @com.google.gson.annotations.Expose public class com.inbeacon.sdk.**

# keep enums
-keep public enum com.inbeacon.sdk.** {
    **[] $VALUES;
    public *;
}

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