airbnb / epoxy

Epoxy is an Android library for building complex screens in a RecyclerView
https://goo.gl/eIK82p
Apache License 2.0
8.47k stars 731 forks source link

EpoxyModelKotlinExtensions.kt not being generated #1277

Closed goodieosc closed 2 years ago

goodieosc commented 2 years ago

I'm new to Epoxy and would like to implement AutoModels using Kotlin.

I have set my Gradle up as follows.

plugins { id 'kotlin-kapt' } ..... kapt { correctErrorTypes = true } .... implementation 'com.airbnb.android:epoxy:5.0.0-beta05' //AirBnB epoxy implementation 'com.airbnb.android:epoxy-databinding:5.0.0-beta05' //AirBnB epoxy annotationProcessor 'com.airbnb.android:epoxy-processor:5.0.0-beta05' //AirBnB epoxy

And created package_info.java with the below...

`@EpoxyDataBindingPattern(rClass = R.class, layoutPrefix = "item")

interface Config {}`

I then understand a EpoxyModelKotlinExtensions.kt file should be generated after a rebuild, but I cant see one.

Am I missing something or is this a bug?

elihart commented 2 years ago

you are applying the processor with annotationProcessor when you should use kapt. this a configuration issue on your part. see the examples, or gradle/kotlin documentation for how to use kapt

goodieosc commented 2 years ago

Hi Eli,

I should have mentioned that I had previously attempted to use kapt, same result with no EpoxyModelKotlinExtensions.kt being created.

kapt 'com.airbnb.android:epoxy-processor:5.0.0-beta05'

Any assistance would be appreciated.

Cheers

OG