Skip to content

Commit afc3bed

Browse files
Update ProGuard documentation (#1095)
Fixes #1094 Update proguard rules from initial suggestion Co-authored-by: Leonid Startsev <[email protected]>
1 parent 36c1315 commit afc3bed

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

README.md

+11-1
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,17 @@ to add this to your `proguard-rules.pro`:
173173

174174
```proguard
175175
-keepattributes *Annotation*, InnerClasses
176-
-dontnote kotlinx.serialization.SerializationKt
176+
-dontnote kotlinx.serialization.AnnotationsKt # core serialization annotations
177+
178+
# kotlinx-serialization-json specific. Add this if you have java.lang.NoClassDefFoundError kotlinx.serialization.json.JsonObjectSerializer
179+
-keepclassmembers class kotlinx.serialization.json.** {
180+
*** Companion;
181+
}
182+
-keepclasseswithmembers class kotlinx.serialization.json.** {
183+
kotlinx.serialization.KSerializer serializer(...);
184+
}
185+
186+
# Change here com.yourcompany.yourpackage
177187
-keep,includedescriptorclasses class com.yourcompany.yourpackage.**$$serializer { *; } # <-- change package name to your app's
178188
-keepclassmembers class com.yourcompany.yourpackage.** { # <-- change package name to your app's
179189
*** Companion;

0 commit comments

Comments
 (0)