how does the kapt build cache work? Does it figure...
# kapt
s
how does the kapt build cache work? Does it figure out which code effects the annotation processor, and re-run when it changes, or does it just only ever run once (which seems like it would be really bad)?
kapt.useBuildCache = true
y
^ @h0tk3y
h
Currently, the cache key for the kapt tasks is mostly the same as that for the compilation tasks (sources, classpath, compiler classpath, compiler arguments etc.) plus the annotation processors classpath & options. If the annotation processors that you use only depend on the sources & classpath, produce only Java/Kotlin sources and classes, and are pure (give the same outputs for the same inputs), it's fine to cache them. Many annotation processors fall into this category, so you can just try and see if the cache works for you. If they read or write anything beside that, it's up to you to add those things as inputs/outputs to the kapt tasks.
Basically, it will re-run just fine on changes in your sources and classpath.
s
Thanks 🙂
that sounds great