diff --git a/app/build.gradle b/app/build.gradle index b57449c..0aa62f3 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -6,8 +6,8 @@ android { applicationId "externius.rdmg" minSdkVersion 23 targetSdk 34 - versionCode 37 - versionName '1.0.33' + versionCode 38 + versionName '1.0.34' testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" proguardFiles 'proguard-rules.pro' multiDexEnabled = false diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro index 1d2e2e0..4e6c425 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -47,4 +47,59 @@ } #For design support library -keep class android.support.design.widget.* { *; } --keep interface android.support.design.widget.* { *; } \ No newline at end of file +-keep interface android.support.design.widget.* { *; } + +# Keep generic signatures; needed for correct type resolution +-keepattributes Signature + +# Keep Gson annotations +-keepattributes RuntimeVisibleAnnotations,AnnotationDefault + +# Keep class TypeToken (respectively its generic signature) if present +-if class com.google.gson.reflect.TypeToken +-keep,allowobfuscation class com.google.gson.reflect.TypeToken + +# Keep any (anonymous) classes extending TypeToken +-keep,allowobfuscation class * extends com.google.gson.reflect.TypeToken + +# Keep classes with @JsonAdapter annotation +-keep,allowobfuscation,allowoptimization @com.google.gson.annotations.JsonAdapter class * + +# Keep fields with any other Gson annotation +# Also allow obfuscation, assuming that users will additionally use @SerializedName or +# other means to preserve the field names +-keepclassmembers,allowobfuscation class * { + @com.google.gson.annotations.Expose ; + @com.google.gson.annotations.JsonAdapter ; + @com.google.gson.annotations.Since ; + @com.google.gson.annotations.Until ; +} + +# Keep no-args constructor of classes which can be used with @JsonAdapter +# By default their no-args constructor is invoked to create an adapter instance +-keepclassmembers class * extends com.google.gson.TypeAdapter { + (); +} +-keepclassmembers class * implements com.google.gson.TypeAdapterFactory { + (); +} +-keepclassmembers class * implements com.google.gson.JsonSerializer { + (); +} +-keepclassmembers class * implements com.google.gson.JsonDeserializer { + (); +} + +# Keep fields annotated with @SerializedName for classes which are referenced. +# If classes with fields annotated with @SerializedName have a no-args +# constructor keep that as well. +-if class * +-keepclasseswithmembers,allowobfuscation class <1> { + @com.google.gson.annotations.SerializedName ; +} +-if class * { + @com.google.gson.annotations.SerializedName ; +} +-keepclassmembers,allowobfuscation,allowoptimization class <1> { + (); +} \ No newline at end of file