Skip to content

Commit

Permalink
Keep default constructors on Gson with R8 full mode
Browse files Browse the repository at this point in the history
  • Loading branch information
sictiru committed Mar 29, 2024
1 parent a5d4f19 commit eed5bda
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions clients/android/NewsBlur/app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,12 @@
-keep class * implements com.google.gson.JsonSerializer
-keep class * implements com.google.gson.JsonDeserializer

# Prevent R8 from leaving Data object members always null
-keepclassmembers, allowobfuscation class * {
# R8
-if class *
-keepclasseswithmembers, allowobfuscation class <1> {
<init>(...);
@com.google.gson.annotations.SerializedName <fields>;
}

# 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

0 comments on commit eed5bda

Please sign in to comment.