Parcelable is a common interface within Android development aimed at providing a more performant serialization API. Generating implementations of the Parcelable interface can be a tedious and boilerplate-filled task involving the creation of a lot of simple and repetitive code. Thankfully, the Kotlin Android Extensions provide an annotation that can generate a Parcelable implementation for us. To make use of this functionality, we can add the @Parcelize annotation to any class that implements Parcelable:
@Parcelize
data class Person(val firstName: String, val lastName: String): Parcelable
By adding the @Parcelize annotation to our model objects, the plugin will generate the required Parcelable implementations for us. This will allow you to skip the implementation, and maintenance of that Parcelable implementation. This reduces the amount of code required for your class and means you don't have to update your Parcelable implementation each time your class is modified; the plugin will do it for you when your code is compiled. This assists in protection from errors that can commonly arise from modifying a property, but forgetting to update the Parcelable implementation.
By making use of the Kotlin Android Extensions plugin, you can reduce the amount of code you must write and maintain, and allow the plugin to generate common boilerplate code for you.