-
-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix android native GSON parsing error
- Loading branch information
1 parent
7c605c5
commit 351d57b
Showing
3 changed files
with
45 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Keep all classes in your plugin's package | ||
-keep class com.gdelataillade.alarm.** { *; } | ||
|
||
# Keep all classes related to Gson and prevent them from being obfuscated | ||
-keep class com.google.gson.** { *; } | ||
-keep class sun.misc.Unsafe { *; } | ||
-keepattributes Signature | ||
-keepattributes *Annotation* | ||
|
||
# Prevent stripping of methods/fields annotated with specific annotations, if needed. | ||
-keepclassmembers class * { | ||
@com.google.gson.annotations.SerializedName <fields>; | ||
} | ||
|
||
# Preserve classes that might be used in reflection or through indirect means | ||
-keepclassmembers class **.R$* { | ||
<fields>; | ||
} | ||
|
||
# Avoid stripping enums, if your plugin uses them | ||
-keepclassmembers enum * { | ||
public static **[] values(); | ||
public static ** valueOf(java.lang.String); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters