Hi folks, I’m trying to find my way around R8 / ProGuard config. I’m just using a dummy test project with
minifyEnabled true
on the release build.
My question is, is it necessary to configure ProGuard for Kotlin serialization, if you always provide a serializer explicitly? So I mean, in every case I call it like this:
serializer.decodeFromString(MyData.serializer(), json)
// or
serializer.encodeToString(MyData.serializer(), myObj)
On observation, my program seems to work fine with obfuscation enabled, without any ProGuard configuration, if I am passing the serializer like this. This seems to contradict the docs:
The library works on Android, but, if you’re using ProGuard, you need to add rules to your <http://proguard-rules.pro|proguard-rules.pro>
configuration to cover all classes that are serialized at runtime.