@Parcelize in multi-platform project
Since Google deprecated android-kotlin-extensions
plugin, you should use kotlin-parcelize
plugin
apply plugin: 'kotlin-parcelize'
Source
Well that's a bit embarrassing, but I've figured out the problem was simply because I forgot to turn on the experimental features of kotlin-android-extensions
, one of which is @Parcelize
...
So to get it work, it was enough to keep my expected
and actual
definitions of Parcelable
and Parcelize
as in the question, and edit lib-android
's build.gradle
and add the following lines:
apply plugin: 'kotlin-android-extensions'
androidExtensions {
experimental = true
}
No dependencies
additions are needed; that was a dead end direction.