|
19 | 19 | # If you keep the line number information, uncomment this to |
20 | 20 | # hide the original source file name. |
21 | 21 | #-renamesourcefileattribute SourceFile |
22 | | --keepclassmembers enum * { *; } |
23 | 22 |
|
24 | | --keep class io.github.sds100.keymapper.** { *; } |
25 | | --keep interface io.github.sds100.keymapper.** { *; } |
| 23 | +-keepclassmembers enum * { |
| 24 | + public static **[] values(); |
| 25 | + public static ** valueOf(java.lang.String); |
| 26 | + } |
| 27 | + |
| 28 | +-keepattributes Signature |
| 29 | + |
| 30 | +# For using GSON @Expose annotation |
| 31 | +-keepattributes *Annotation* |
| 32 | + |
| 33 | +# Gson specific classes |
| 34 | +-dontwarn sun.misc.** |
| 35 | +#-keep class com.google.gson.stream.** { *; } |
| 36 | + |
| 37 | +# Keep data entities so proguard doesn't break serialization/deserialization. |
| 38 | +-keep class io.github.sds100.keymapper.data.entities.** { <fields>; } |
| 39 | + |
| 40 | +# Prevent proguard from stripping interface information from TypeAdapter, TypeAdapterFactory, |
| 41 | +# JsonSerializer, JsonDeserializer instances (so they can be used in @JsonAdapter) |
| 42 | +-keep class * extends com.google.gson.TypeAdapter |
| 43 | +-keep class * implements com.google.gson.TypeAdapterFactory |
| 44 | +-keep class * implements com.google.gson.JsonSerializer |
| 45 | +-keep class * implements com.google.gson.JsonDeserializer |
| 46 | + |
| 47 | +# Prevent R8 from leaving Data object members always null |
| 48 | +-keepclassmembers,allowobfuscation class * { |
| 49 | + @com.google.gson.annotations.SerializedName <fields>; |
| 50 | +} |
| 51 | + |
| 52 | +# Retain generic signatures of TypeToken and its subclasses with R8 version 3.0 and higher. |
| 53 | +-keep,allowobfuscation,allowshrinking class com.google.gson.reflect.TypeToken |
| 54 | +-keep,allowobfuscation,allowshrinking class * extends com.google.gson.reflect.TypeToken |
26 | 55 |
|
27 | 56 | -keep class com.google.android.material.** { *; } |
28 | 57 |
|
|
0 commit comments