Request: support Kotlin too
AndroidDeveloperLB opened this issue · 0 comments
AndroidDeveloperLB commented
Maybe use the "Parcelable support" of "Android Extensions plugin" :
https://blog.jetbrains.com/kotlin/2017/08/kotlin-1-1-4-is-out/
It could be great. Your plugin could just use it, and work as a nice UI to generate its code, choosing which fields to be stored&restored, and which not, and in which order, etc...
An example of usage, using this feature:
Gradle file :
apply plugin: 'org.jetbrains.kotlin.android.extensions'
androidExtensions {
experimental = true
}
sample code of a class with 3 Dates in it:
@SuppressLint("ParcelCreator")
@Parcelize
class MonthItem(val today: Date, val startDate: Date, val endDate: Date) : Parcelable {
}