https://kotlinlang.org logo
#kapt
Title
# kapt
t

tevjef

05/02/2019, 3:31 PM
With the changes made to kapt in 1.3.31, kotlin does some aggressive caching to decrease incremental built times. Unfortunately, some annotation processors and kapt don’t work well together and the cache is not properly invalidated in some conditions. - Deleted classes with
@Inject
may still have code generated for it. - Moved classes with
@Inject
may still have code generated in the old location. This behavior is enabled by default in Kotlin 1.3.31. Is there something I need to configure to ensure the cache is properly invalidated? This is causing some issues for my team, especially when we switch between branched.
g

gildor

05/04/2019, 3:14 AM
I would report it to AP issue tracker if you have reproducible example
It also may be a problem of incremental kapt of course, but I would start from AP itself
t

tevjef

05/05/2019, 9:49 PM
Thank you for the reply. I’ve created an issue. https://youtrack.jetbrains.com/issue/KT-31322
e

Eugen Martynov

05/14/2019, 1:21 PM
Is it same cause if we use Moshi code generation?
We constantly see
Copy code
Task :app:kaptDebugKotlin
e: (source unavailable)
e: (source unavailable)
e: (source unavailable)
e: /app/build/generated/source/kaptKotlin/android/transaction/overview/data/domain/TransactionPeriodInfoJsonAdapter.kt:0: error: cannot find symbol