# android

Sergio C.

09/19/2019, 9:38 AM
hello people, Anyone using kotlin DSL to manage gradle builds? Is it worth it? What impact does it have in build speed?


09/19/2019, 12:30 PM
Getting rid of the Groovy nightmare is always worth it. I don’t think Groovy vs Kotlin as the script language has any meaningful impact on build speed


09/19/2019, 12:33 PM
There def is a impact on build speeds lol. For a prod app, I dont think I would suggest it

Giorgio Antonioli

09/19/2019, 12:59 PM
I link an issue from YouTrack about the build speed since you requested it: BTW we have a project with around 100 Gradle modules and we tried to switch to kotlin dsl but since sometimes we had some bugs and we had to switch it back to groovy, we decided to convert only our
plugins and tasks to Kotlin DSL and leave the rest in Groovy ATM.

Sergio C.

09/19/2019, 1:11 PM
yes. Slower as expected... and if it still has bugs I think I'll pass for now. Thank you. Maybe later when it's more stable. A good idea would be to have an automatic converter as with java to kotlin.
👍 1

Casey Brooks

09/19/2019, 2:24 PM
I would say that the speed different is noticible only if you profile the build. If you’re casually using Gradle from the command line, you probably won’t notice much of a difference. The main hit to performance is the initial startup as it compiles the Kotlin, but the runtime beyond that is pretty much the same as Groovy
And regardless of build speed, feeling like I can actually do stuff in my build scripts with Kotlin’s strong typing is 100% worth the hit to performance
Also, from my experience, you’ll have a much better time using Kotlin DSL on new projects that aren’t already burdened by Groovy scripts. It’s pretty difficult to convert Groovy scripts to Kotlin, especially for large multi-module projects. But if you start in Kotlin, it’s pretty easy to keep everything in Kotlin
👍 6

Gustavo Levandowski

09/27/2019, 1:08 PM