Prevent Proguard from stripping interface info from @JsonAdapter classes

Previously after Proguard, the classes would no longer implement the interfaces, leading to `JsonAdapterAnnotationTypeAdapterFactory` throwing.

Fixes #925
This commit is contained in:
Chaitanya Pramod 2016-09-14 18:57:35 +05:30 committed by GitHub
parent 2271525dd5
commit 74f4f74b8b

View File

@ -13,4 +13,10 @@
# 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 ----------