Help me to keep enum values

Hello developers,
I'm working on an extension project and here I'm using some enum classes. But the ProGuard is shirking the enum values even I'm using keep rules for that class.

-keep class com.buxi.csvparser.common.Model {
  public protected *;
}

It's com.buxi.csvparser.common.Model a enum class and I want to keep this class with its values. Please help me to do it.
Thanks in advance :+1:

1 Like

Try these rules below. I believe it should keep all values ​​from the model enum class.

-keepclassmembers enum com.buxi.csvparser.common.Model {
  public static [] values();
  public static  valueOf(java.lang.String);
}
2 Likes

Thanks, it's working. However, I've to keep that class also.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.