0

I'm removing KAE plugin to replace with kotlin-parcelize and i expect there is no change in behavior at all. But after that, i got warning on one of parcelable class. Here is my class.

@Parcelize
class SomeParcelableClass(
    var foo: String
) : Parcelable {

    @Transient
    var bar: String? = null // warning here
}

The bar properties get Property would not be serialized into a Parcel warning. I look into documentation and found it:

@Parcelize requires all serialized properties to be declared in the primary constructor. The plugin issues a warning on each property with a backing field declared in the class body.

My question is, will the behavior change since there is no warning when using KAE plugin? Or this is still the same behavior and the warning just newly added to make it clear? Is it safe to replace KAE with kotlin-parcelize in this condition?

wiryadev
  • 1,089
  • 1
  • 11
  • 33

0 Answers0