Skip to content

Commit

Permalink
Merge pull request #1436 from nextcloud/cleanup-proguard-gson
Browse files Browse the repository at this point in the history
cleanup proguard gson rules
  • Loading branch information
David-Development authored Jun 12, 2024
2 parents 0c523d0 + 553af7a commit 0291b77
Showing 1 changed file with 0 additions and 36 deletions.
36 changes: 0 additions & 36 deletions News-Android-App/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -45,42 +45,6 @@
# https://github.com/umano/AndroidSlidingUpPanel/issues/921
-dontwarn com.sothree.slidinguppanel.SlidingUpPanelLayout

# Gson
# Following are rules from
# https://github.com/google/gson/blob/37ed0fcbd7930df0aad9f5068c608e4465413877/examples/android-proguard-example/proguard.cfg
# no rules are packaged into gson (as of 2.10.1)
##---------------Begin: proguard configuration for Gson ----------
# Gson uses generic type information stored in a class file when working with fields. Proguard
# removes such information by default, so configure it to keep all of it.
-keepattributes Signature

# For using GSON @Expose annotation
-keepattributes *Annotation*

# Gson specific classes
-dontwarn sun.misc.**
#-keep class com.google.gson.stream.** { *; }

# Application classes that will be serialized/deserialized over Gson
-keep class com.nextcloud.android.sso.model.** { <fields>; }

# Prevent proguard from stripping interface information from TypeAdapter, TypeAdapterFactory,
# JsonSerializer, JsonDeserializer instances (so they can be used in @JsonAdapter)
-keep class * extends com.google.gson.TypeAdapter
-keep class * implements com.google.gson.TypeAdapterFactory
-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 * {
@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

##---------------End: proguard configuration for Gson ----------

# Other Libraries
-dontwarn org.apache.velocity.**
Expand Down

0 comments on commit 0291b77

Please sign in to comment.