2011-07-23 03:08:34 +02:00
|
|
|
##---------------Begin: proguard configuration for Gson ----------
|
2011-07-25 08:23:02 +02:00
|
|
|
# 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
|
|
|
|
|
2011-12-16 06:18:01 +01:00
|
|
|
# For using GSON @Expose annotation
|
|
|
|
-keepattributes *Annotation*
|
|
|
|
|
2011-07-22 22:55:37 +02:00
|
|
|
# Gson specific classes
|
2017-09-15 17:18:32 +02:00
|
|
|
-dontwarn sun.misc.**
|
2011-07-25 08:23:02 +02:00
|
|
|
#-keep class com.google.gson.stream.** { *; }
|
2011-07-23 03:08:34 +02:00
|
|
|
|
|
|
|
# Application classes that will be serialized/deserialized over Gson
|
|
|
|
-keep class com.google.gson.examples.android.model.** { *; }
|
|
|
|
|
2016-09-14 15:27:35 +02:00
|
|
|
# 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
|
|
|
|
|
2019-05-08 00:19:00 +02:00
|
|
|
# Prevent R8 from leaving Data object members always null
|
|
|
|
-keepclassmembers,allowobfuscation class * {
|
|
|
|
@com.google.gson.annotations.SerializedName <fields>;
|
|
|
|
}
|
|
|
|
|
2011-07-23 03:08:34 +02:00
|
|
|
##---------------End: proguard configuration for Gson ----------
|