Here is my Entity class:
class Entity{
private String id;
Object content;
private Type type;
public enum Type{type1, type2, type3}
}
Depending on type
field I pass respective the class to
gson.fromJson(json, <type1/2/3 class, depending on field type>);
But I am using proguard, and this obfuscate the type value, so I am not able to determine which class to use.
I tried to keep type field but its not keeping. Here is my code:
-keepclassmembers enum * { *; }
-keepclassmembers class com.mypkg.Entity {
private java.lang.String id;
private com.mypkg.Entity.Type type;
}
I see that id is being kept, but not the type field.
Please help.