the 30 seconds should only be spent on the first build. incremental build should only rebuild the files you changed
m
mingkangpan
11/21/2017, 9:10 AM
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
yan
11/21/2017, 11:29 AM
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
mingkangpan
11/21/2017, 11:36 AM
does kotlin annotation processing also support incremental compilation?
y
yan
11/21/2017, 1:35 PM
kaptGenerateStubs…Kotlin
task supports incremental compilation.
kapt...Kotlin
(the second task) does not (and it’s technically impossible).
m
mingkangpan
11/21/2017, 3:55 PM
@yan could you explain me why it is impossible to incremental compile kapt? some simple explanation for dummys like me? 🙂
y
yan
11/21/2017, 3:56 PM
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.