blob: 8433e82fc2b8b4c7dbbe53f9390e7ebcf852add9 [file] [log] [blame]
Jeongik Cha4d8477e2024-10-30 13:27:51 +09001##---------------Begin: proguard configuration for Gson ----------
2# Gson uses generic type information stored in a class file when working with fields. Proguard
3# removes such information by default, so configure it to keep all of it.
4-keepattributes Signature
5
6# For using GSON @Expose annotation
7-keepattributes *Annotation*
8
9# Gson specific classes
10-dontwarn sun.misc.**
11#-keep class com.google.gson.stream.** { *; }
12
13# Application classes that will be serialized/deserialized over Gson
14-keep class com.android.virtualization.vmlauncher.ConfigJson { <fields>; }
15-keep class com.android.virtualization.vmlauncher.ConfigJson$* { <fields>; }
16
17# Prevent proguard from stripping interface information from TypeAdapter, TypeAdapterFactory,
18# JsonSerializer, JsonDeserializer instances (so they can be used in @JsonAdapter)
19-keep class * extends com.google.gson.TypeAdapter
20-keep class * implements com.google.gson.TypeAdapterFactory
21-keep class * implements com.google.gson.JsonSerializer
22-keep class * implements com.google.gson.JsonDeserializer
23
24# Prevent R8 from leaving Data object members always null
25-keepclassmembers,allowobfuscation class * {
26 @com.google.gson.annotations.SerializedName <fields>;
Jeongik Cha4a8ee3a2024-09-20 18:06:29 +090027}
Jeongik Cha4d8477e2024-10-30 13:27:51 +090028
29# Retain generic signatures of TypeToken and its subclasses with R8 version 3.0 and higher.
30-keep,allowobfuscation,allowshrinking class com.google.gson.reflect.TypeToken
31-keep,allowobfuscation,allowshrinking class * extends com.google.gson.reflect.TypeToken
32
Jiyong Park6a2a4dc2024-11-05 07:33:00 +090033##---------------End: proguard configuration for Gson ----------