parceler
parceler copied to clipboard
RealmProxy$$Parcerable not generated automaticaly - Kotlin
- Android Preview 3.0 canary 7
- Kotlin Gradle Plugin 1.1.3-2
- Parceler 1.1.9
Project
dependencies { classpath 'io.realm:realm-gradle-plugin:3.5.0' }
App
apply plugin: 'kotlin-kapt'
dependencies { compile 'org.parceler:parceler-api:1.1.9' kapt 'org.parceler:parceler:1.1.9' }
I've noticed that all kotlin classes which are using Realm (extend RealmObject() or implements RealmModel with @RealmClass annotation) are not generating XXXRealmProxy$$Parcerable in app\build\generated\source\kapt\debug\io\realm
I do not know why but the only way to create these classes I have to follow this steps.
-
Create class - for example:
@Parcel(implementations = arrayOf(CurrentlyRealmProxy::class), value = Parcel.Serialization.FIELD, analyze = arrayOf(Currently::class)) open class Currently(@SerializedName("time") @Expose var time: Int? = null) : RealmObject() -
Build project
-
RealmProxy$$Parcerable in not generated
-
Modify class that was created (add space or change one sign in variable)
-
Build project for the second time
-
RealmProxy$$Parcerable is generated
#301 is not fixing this.