From 1b64dcb6e2fcf02270f643d1fb4e5146dcf60a2e Mon Sep 17 00:00:00 2001 From: Jamie Sanson Date: Tue, 13 Aug 2024 08:47:49 +0100 Subject: [PATCH] R8: Keep name of `Gson` class This ensures the Java SDK is able to look up Gson, and select the correct config parser on Android platforms. --- proguard-rules.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/proguard-rules.txt b/proguard-rules.txt index 6fbd7e3d..f0197f30 100644 --- a/proguard-rules.txt +++ b/proguard-rules.txt @@ -85,5 +85,8 @@ # 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 + +# Retain the name used by the Java SDK to determine whether Gson is usable as a config parser. +-keepnames class com.google.gson.Gson ##---------------End: proguard configuration for Gson ----------