I became happier with Gradle once I switched from Groovy to Kotlin DSL build files. I was never interested in learning Groovy TBH, and like the author of the article said, you can't really understand Gradle's DSL syntax unless you know Groovy and grok that Gradle's build files are actually scripts full of imperative programming. Switching to the Kotlin DSL syntax allows IntelliJ to infer variable types, and constrains the build file syntax a bit more.
Gradle gets even better when you keep task definitions out of your build.gradles. I highly recommend the talk that Cedric Champeau gave to the Madrid groovy users group last year on cleaning up the groovy build.
Thanks very much for the link. I enjoyed the video and have started restructuring my project's build.gradle files as Cedric Champeau suggests, using plugins.
3
u/transcend Mar 30 '21
I became happier with Gradle once I switched from Groovy to Kotlin DSL build files. I was never interested in learning Groovy TBH, and like the author of the article said, you can't really understand Gradle's DSL syntax unless you know Groovy and grok that Gradle's build files are actually scripts full of imperative programming. Switching to the Kotlin DSL syntax allows IntelliJ to infer variable types, and constrains the build file syntax a bit more.