kamikat / moshi-jsonapi

JSON API v1.0 Specification in Moshi.
MIT License
156 stars 34 forks source link

ProGuard issue #62

Closed Sbf closed 7 years ago

Sbf commented 7 years ago

I've been unable to fix the crash when proGuard is enabled. It says, java.lang.NoSuchFieldError: No static field SERIALIZATION_AND_DESERIALIZATION of type Lmoe/banana/jsonapi2/Policy; in class Lmoe/banana/jsonapi2/Policy; or its superclasses

I did add these rules, but not working for some reason.

-keepattributes Signature -keepclassmembers public abstract class moe.banana.jsonapi2.* { ; }

-keepclassmembers class * { @com.squareup.moshi.FromJson ; @com.squareup.moshi.ToJson *; }

Any help would be appreciated!

kamikat commented 7 years ago

Does it work with following rule?

-keepattributes Signature
-keep class moe.banana.jsonapi2.** {
    *;
}
Sbf commented 7 years ago

I thought I tried that, but it worked! Thanks kamikat!

vlrybkin commented 6 years ago

the readme was not updated