diff --git a/.changes/fix-android-proguard.md b/.changes/fix-android-proguard.md new file mode 100644 index 000000000..f6e7dafae --- /dev/null +++ b/.changes/fix-android-proguard.md @@ -0,0 +1,5 @@ +--- +"tauri": patch:bug +--- + +Add a Proguard rule to prevent custom JSON deserializer and serializer classes from being optimized away. diff --git a/crates/tauri/mobile/android/proguard-rules.pro b/crates/tauri/mobile/android/proguard-rules.pro index ab4493362..e21b5beb4 100644 --- a/crates/tauri/mobile/android/proguard-rules.pro +++ b/crates/tauri/mobile/android/proguard-rules.pro @@ -28,4 +28,14 @@ *; } +-keep @com.fasterxml.jackson.databind.annotation.JsonDeserialize public class * { + *; +} + +-keep @com.fasterxml.jackson.databind.annotation.JsonSerialize public class * { + *; +} + -keep class * extends com.fasterxml.jackson.databind.JsonDeserializer { *; } + +-keep class * extends com.fasterxml.jackson.databind.JsonSerializer { *; }