mirror of
https://github.com/fankes/moshi.git
synced 2025-10-19 16:09:21 +08:00
Embed ProGuard rules in the jar
This commit is contained in:
18
moshi/src/main/resources/META-INF/proguard/moshi.pro
Normal file
18
moshi/src/main/resources/META-INF/proguard/moshi.pro
Normal 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>;
|
||||
}
|
Reference in New Issue
Block a user