Merge pull request #628 from gabrielittner/master

Embed ProGuard rules in the jar
This commit is contained in:
Jesse Wilson
2018-09-08 14:58:44 -04:00
committed by GitHub
3 changed files with 28 additions and 25 deletions

View File

@@ -0,0 +1,18 @@
# JSR 305 annotations are for embedding nullability information.
-dontwarn javax.annotation.**
-keepclasseswithmembers class * {
@com.squareup.moshi.* <methods>;
}
-keep @com.squareup.moshi.JsonQualifier interface *
# The name of @JsonClass types is used to look up the generated adapter.
-keepnames @com.squareup.moshi.JsonClass class *
# Retain generated JsonAdapters if annotated type is retained.
-if @com.squareup.moshi.JsonClass class *
-keep class <1>JsonAdapter {
<init>(...);
<fields>;
}