How to tell ProGuard to keep private fields without specifying each field

According to ProGuard documenation the wildcard <fields> matches any field. Thus it should be something like:

-keepclassmembers class com.tools.app.holiday.Holiday {
    private <fields>;    
}

If you want to preserve private fields in all classes use:

-keepclassmembers class * {
    private <fields>;    
}

Leave a Comment