From ae380e92920c05ee93e311bba8973596c359cff9 Mon Sep 17 00:00:00 2001 From: Muzahidul Islam <129880873+muzahidul-opti@users.noreply.github.com> Date: Wed, 18 Sep 2024 22:20:41 +0600 Subject: [PATCH] R8: Keep name of `Gson` class (#493) This ensures the Java SDK is able to look up Gson, and select the correct config parser on Android platforms. Co-authored-by: Jamie Sanson --- 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 ----------