Kotlin 1.5 builds significantly slower than 1.4

Viewed 55

Upgrading from Kotlin 1.4.32 to 1.5.x i noticed a significantly higher build time, especially on re-builds without code changes it takes about 1 minute longer. My project is quite large, a installDebug-Build without code changes takes 46s (1.4) or 1m 53s (1.5) averaged. Most of this time (~50-55 seconds) gradle spents on the task "configuring projects".
Has anyone else experienced such increase in build times? Or anyone maybe even has a solution or at least a hint on what is causing that massive increase? I am using Android-Gradle-Plugin 7 and Gradle 7.1 (older versions did not solve the problem).

1 Answers

Maybe you could try using Gradle's configuration cache if that's what takes time for you.

The Kotlin gradle plugin started being compatible with configuration cache in 1.5 so maybe the changes made there slowed down the regular un-cached configuration phase (but that's really just a wild guess). In any case, configuration cache should definitely give you a boost in this phase.

Related