immutables / immutables

Annotation processor to create immutable objects and builders. Feels like Guava's immutable collections but for regular value objects. JSON, Jackson, Gson, JAX-RS integrations included
http://immutables.org
Apache License 2.0
3.39k stars 273 forks source link

Unresolved references in Kotlin files #661

Open niltonvasques opened 6 years ago

niltonvasques commented 6 years ago

Looks like that the generated classes from from immutables cannot be found on kotlin files.

I have also tried with 'kotlin-kapt' plugin without success.

Using kotlin incremental compilation
e: /home/niltonvasques/Development/android-dev/workspace/pms-redux-android/app/src/main/java/br/com/kaefer/pms/reducers/sync/ProjectReducer.kt: (6, 33): Unresolved reference: ImmutableAppState
e: /home/niltonvasques/Development/android-dev/workspace/pms-redux-android/app/src/main/java/br/com/kaefer/pms/reducers/sync/ProjectReducer.kt: (18, 9): Unresolved reference: ImmutableAppState
:app:compileDemoDebugKotlin FAILED
elucash commented 6 years ago

Thank you for reporting this! good to know, so Kotlin compiler/kapt does not integrate correctly with Java annotation processing. You may try to report this on Kotlin issue tracker. A workaround would be not using generated java classes in kotlin code and, with Immutables, following functionality might be useful: