immich/mobile/android/app/proguard-rules.pro
Brandon Wees f32d4f15b6
feat(mobile): android widgets (#19310)
* wip

* wip widgets

* more wip changes

* latest changes

* working random widget

* cleanup

* add configurable widget

* add memory widget and cleanup of codebase

* album name handling

* add deeplinks

* finish minor refactoring and add some polish :)

* fix single shot type on random widget

Co-authored-by: shenlong <139912620+shenlong-tanwen@users.noreply.github.com>

* switch to ExposedDropdownMenuBox for random configure activity

* handle empty album and no connection edge cases

* android project cleanup

* fix proguard and gson issues

* fix deletion handling

* fix proguard stripping for widget model classes/enums

* change random configuration activity close to a checkmark on right side

---------

Co-authored-by: shenlong <139912620+shenlong-tanwen@users.noreply.github.com>
2025-07-18 09:37:07 -05:00

39 lines
1.7 KiB
Prolog

##---------------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.google.gson.examples.android.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>;
}
# TypeToken preventions
-keep class com.google.gson.reflect.TypeToken { *; }
-keep class * extends com.google.gson.reflect.TypeToken
# 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 ----------
# Keep all widget model classes and their fields for Gson
-keep class app.alextran.immich.widget.model.** { *; }