Skip to content

Commit

Permalink
fix(core): prevent Proguard from optimizing away custom ser/de classes (
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasfernog authored Sep 13, 2024
1 parent c901d9f commit be18ed5
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changes/fix-android-proguard.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"tauri": patch:bug
---

Add a Proguard rule to prevent custom JSON deserializer and serializer classes from being optimized away.
10 changes: 10 additions & 0 deletions crates/tauri/mobile/android/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -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 { *; }

0 comments on commit be18ed5

Please sign in to comment.