Skip to content
Permalink
Browse files

Keep `TypeAdapter`s from being stripped (#1546)

  • Loading branch information...
hqzxzwb authored and inder123 committed Oct 3, 2019
1 parent 7845c38 commit d6e6a01f02417052cb1b65e9056bb678c4f91d98
Showing with 2 additions and 1 deletion.
  1. +2 −1 examples/android-proguard-example/proguard.cfg
@@ -13,8 +13,9 @@
# Application classes that will be serialized/deserialized over Gson
-keep class com.google.gson.examples.android.model.** { <fields>; }

# Prevent proguard from stripping interface information from TypeAdapterFactory,
# Prevent proguard from stripping interface information from TypeAdapter, TypeAdapterFactory,
# JsonSerializer, JsonDeserializer instances (so they can be used in @JsonAdapter)
-keep class * implements com.google.gson.TypeAdapter
-keep class * implements com.google.gson.TypeAdapterFactory
-keep class * implements com.google.gson.JsonSerializer
-keep class * implements com.google.gson.JsonDeserializer

0 comments on commit d6e6a01

Please sign in to comment.
You can’t perform that action at this time.