Skip to content
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

Generated proguard rules are missing from output #1202

Closed
wynneplaga opened this issue Aug 8, 2024 · 0 comments
Closed

Generated proguard rules are missing from output #1202

wynneplaga opened this issue Aug 8, 2024 · 0 comments

Comments

@wynneplaga
Copy link

wynneplaga commented Aug 8, 2024

First noted here: #991 (comment)

Proguard rules generated by Moshi do not end up in the output. This prevents using moshi-kotlin-codegen as a drop-in library.

Substitute manual proguard rules for anyone facing this issue:

-keepnames @com.squareup.moshi.JsonClass class *
-keep class * extends com.squareup.moshi.JsonAdapter {
    public <init>(com.squareup.moshi.Moshi);
}
-if @com.squareup.moshi.JsonClass class *
-keepnames class kotlin.jvm.internal.DefaultConstructorMarker
-keepclassmembers @com.squareup.moshi.JsonClass @kotlin.Metadata class * {
    synthetic <init>(...);
}
@wynneplaga wynneplaga closed this as not planned Won't fix, can't repro, duplicate, stale Aug 8, 2024
@wynneplaga wynneplaga reopened this Aug 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant