From d3a75cb56937d687a66c8710e40c2da6223db0c3 Mon Sep 17 00:00:00 2001 From: Christoffer Quist Adamsen Date: Thu, 5 Aug 2021 09:18:32 +0200 Subject: [PATCH] Retain generic signature of TypeToken with R8 version 3.0 and higher --- examples/android-proguard-example/proguard.cfg | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/examples/android-proguard-example/proguard.cfg b/examples/android-proguard-example/proguard.cfg index e0e0a97f48..95f31ec6d6 100644 --- a/examples/android-proguard-example/proguard.cfg +++ b/examples/android-proguard-example/proguard.cfg @@ -25,4 +25,8 @@ @com.google.gson.annotations.SerializedName ; } +# Retain generic signatures of TypeToken and its subclasses with R8 version 3.0 and higher. +-keep,allowobfuscation,allowshrinking class com.google.gson.reflect.TypeToken +-keep,allowobfuscation,allowshrinking class * extends com.google.gson.reflect.TypeToken + ##---------------End: proguard configuration for Gson ----------