Skip to content

Commit 5969af5

Browse files
committed
Add proguard rules for using Gson TypeToken
1 parent 72733b7 commit 5969af5

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

app/proguard-rules.pro

+6
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,9 @@
2525
public static <1> INSTANCE;
2626
kotlinx.serialization.KSerializer serializer(...);
2727
}
28+
29+
# Needed for using TypeToken with Gson
30+
# Taken from: https://r8.googlesource.com/r8/+/refs/heads/main/compatibility-faq.md#troubleshooting-gson-gson
31+
-keepattributes Signature
32+
-keep class com.google.gson.reflect.TypeToken { *; }
33+
-keep class * extends com.google.gson.reflect.TypeToken

0 commit comments

Comments
 (0)