https://kotlinlang.org logo
Title
i

ikej

10/11/2018, 8:57 PM
After having migrated a larger project (100+ modules) to the Kotlin DSL, my biggest pain point is that when I change something in buildSrc, all scripts have to be recompiled and that takes a very long time. There is an issue that proposes to run the compilation in parallel, that would help quite a bit. But even better would be an incremental mode where scripts are only recompiled if necessary. Is that feasible?
m

mkobit

10/11/2018, 8:59 PM
this is a pretty annoying issue for me too i think https://github.com/gradle/gradle/issues/6045 is overall for the improvements
👍 1
e

eskatos

10/12/2018, 8:04 AM
Thank you for the feedback @ikej!
buildSrc
needs to be refined to provide a better feedback loop in general, but the kotlin-dsl itself is a big contributor to that feedback loop. Parallel script compilation would be one way to make it faster, it’s tied to Gradle scripts evaluation model though. Compilation avoidance would be easier to apply to scripts (change an implementation detail -> no recompilation), that’s https://github.com/gradle/kotlin-dsl/issues/740 As part of compiling scripts Kotlin code gets generated and compiled, this step can be optimized, see https://github.com/gradle/kotlin-dsl/issues/817
👍 1
i

ikej

10/12/2018, 8:17 AM
#740 is the issue I was looking for, thank you! Glad to see that this is planned for 1,1.