Skip to content

Commit e6bf7b5

Browse files
alextran1502yosit
authored andcommitted
fix(mobile): Android local notification failes to invoke (immich-app#14155)
* fix(mobile): local notification failed to invoke * add proguard rules
1 parent 59f1657 commit e6bf7b5

File tree

2 files changed

+33
-1
lines changed

2 files changed

+33
-1
lines changed

Diff for: mobile/android/app/proguard-rules.pro

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
##---------------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.google.gson.examples.android.model.** { <fields>; }
15+
16+
# Prevent proguard from stripping interface information from TypeAdapter, TypeAdapterFactory,
17+
# JsonSerializer, JsonDeserializer instances (so they can be used in @JsonAdapter)
18+
-keep class * extends com.google.gson.TypeAdapter
19+
-keep class * implements com.google.gson.TypeAdapterFactory
20+
-keep class * implements com.google.gson.JsonSerializer
21+
-keep class * implements com.google.gson.JsonDeserializer
22+
23+
# Prevent R8 from leaving Data object members always null
24+
-keepclassmembers,allowobfuscation class * {
25+
@com.google.gson.annotations.SerializedName <fields>;
26+
}
27+
28+
# Retain generic signatures of TypeToken and its subclasses with R8 version 3.0 and higher.
29+
-keep,allowobfuscation,allowshrinking class com.google.gson.reflect.TypeToken
30+
-keep,allowobfuscation,allowshrinking class * extends com.google.gson.reflect.TypeToken
31+
32+
##---------------End: proguard configuration for Gson ----------

Diff for: mobile/android/gradle.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ org.gradle.jvmargs=-Xmx4096M
22
android.useAndroidX=true
33
android.enableJetifier=true
44
android.nonTransitiveRClass=false
5-
android.nonFinalResIds=false
5+
android.nonFinalResIds=false

0 commit comments

Comments
 (0)