parceler icon indicating copy to clipboard operation
parceler copied to clipboard

RealmProxy$$Parcerable not generated automaticaly - Kotlin

Open DawidJamrozy opened this issue 8 years ago • 0 comments

  • 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.

  1. 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()

  2. Build project

  3. RealmProxy$$Parcerable in not generated

  4. Modify class that was created (add space or change one sign in variable)

  5. Build project for the second time

  6. RealmProxy$$Parcerable is generated

#301 is not fixing this.

DawidJamrozy avatar Aug 07 '17 10:08 DawidJamrozy