Skip to content

Commit

Permalink
R8: Keep name of Gson class (#493)
Browse files Browse the repository at this point in the history
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 <jamie.sanson@mnscorp.net>
  • Loading branch information
muzahidul-opti and jamiesanson committed Sep 18, 2024
1 parent 70d50b9 commit ae380e9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions proguard-rules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 ----------

0 comments on commit ae380e9

Please sign in to comment.