I have the following class.
public class StatusCategory
{
   @JsonProperty("key")
   private final String m_key = null;
   public String getKey()
   {
      return(m_key);
   }
}
What is the -keep option that will ensure the constructor won't be removed by Proguard?
The following will keep the constructor; however, I don't want to have to specify every single class or package.
-keep class oracle.psr.ndr.jira.api.StatusCategory {<init>;}
                Annotate the constructor with @JsonCreator and use -keepclassmembers like so:
-keepclassmembers public class * {
     @com.fasterxml.jackson.annotation.JsonCreator *;
}
                        If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With