Merge pull request #537 from hzsweers/patch-1

Update proguard rules to differentiate between reflect or codegen
This commit is contained in:
Jesse Wilson
2018-05-14 23:35:30 -04:00
committed by GitHub

View File

@@ -588,10 +588,15 @@ If you are using ProGuard you might need to add the following options:
-keep @com.squareup.moshi.JsonQualifier interface *
```
Additional rules are needed if you are using Kotlin:
*...If you are using the reflect API (i.e. `KotlinJsonAdapter`):*
```
-keepclassmembers class kotlin.Metadata {
public <methods>;
}
```
*...If you are using the codegen API (i.e. `JsonClass(generateAdapter = true)`):*
```
-keepnames class **JsonAdapter
-keepnames @com.squareup.moshi.JsonClass class *
```