the 30 seconds should only be spent on the first b...
# build-tools
k
the 30 seconds should only be spent on the first build. incremental build should only rebuild the files you changed
m
yeah, but if you switch branches, you have almost to clean again or IDE throws an error, or if you introduce a new class or method or field, the
generateStubs
need to be invoked it just much slower than a "normal" incremental build and on slower PC it costs time 😕
y
or IDE throws an error
What error are you talking about? Stub generation task supports incremental compilation, just as the normal compileKotlin task. If it isn’t true for you then it’s a bug.
m
does kotlin annotation processing also support incremental compilation?
y
kaptGenerateStubs…Kotlin
task supports incremental compilation.
kapt...Kotlin
(the second task) does not (and it’s technically impossible).
m
@yan could you explain me why it is impossible to incremental compile kapt? some simple explanation for dummys like me? 🙂
y
Kapt task does not compile everything, it just invokes javac in order to launch annotation processing. AP itself can’t be incremental as JSR269 does not provide any support for that.