-
Notifications
You must be signed in to change notification settings - Fork 761
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Obfuscation and enums #689
Comments
Yeah, I like that. |
Does that mean that enums will only work with moshi if they're annotated with |
If you're using proguard/R8 and they would rename or remove one of the enum fields, yes. |
I don't understand why |
@ezamelczykespeo Issue probably resides in this line: The Java method |
@gabrielittner you just saved my day. 🙇 |
The integrated
EnumJsonAdapter
inStandardJsonAdapters
can't be instantiated because the field name doesn't match the name anymore.My solution is to annotate enums that are used with Moshi with
@JsonClass(generateAdapter = false)
and then keep the field names for annotated enums:This way it's possible to avoid keeping all enums.
Do you think it would make sense to add it to the shipped Proguard config?
The text was updated successfully, but these errors were encountered: