Update from Forestry.io

Harsh Shandilya updated content/posts/why-i-went-back-to-the-gradle-groovy-dsl.md
This commit is contained in:
Harsh Shandilya 2019-11-06 06:20:04 +00:00 committed by Forestry.io
parent ad2820b396
commit 7783a48c33
1 changed files with 11 additions and 3 deletions

View File

@ -15,11 +15,11 @@ However the dream slowly started fading as more and more people started using th
Just a disclaimer, This post is not meant to completely trash the Kotlin DSL's usability. It has it's own very great benefits and people who leverage those should continue using it and disregard this post :-)
## Build times
### Build times
The Gradle Kotlin DSL inflates build times _significantly_. Compiling `buildSrc` and all the `*.gradle.kts` files for my [app](http://github.com/msfjarvis/viscerion/tree/1ea6f07f8219aa42139977f37ebbcb230d7f78e7 "app") takes upto 10 seconds longer than the Groovy DSL. Couple that with the fact that changing any file from `buildSrc` invalidated the entire compiler cache for me made iterative development extremely painful.
## Half-baked API surface
### Half-baked API surface
Gradle doesn't seem to have invested any actual time in converting the original Groovy APIs into Kotlin-friendly versions before they peddled the Kotlin DSL to us. Check the samples below and decide for yourself.
@ -136,4 +136,12 @@ dependencies {
}
\`\`\`
Property access syntax and discoverable variable names should have been the norm since day one for it to actually be a good Kotlin DSL.
Property access syntax and discoverable variable names should have been the norm since day one for it to actually be a good Kotlin DSL.
### Complexity
The Kotlin DSL is not very well documented outside Gradle's bits and pieces in documentation. Things like [this](https://github.com/msfjarvis/viscerion/commit/c851571e33189c345329ea3934ad1af15edbe6fb "this") were incredibly problematic to implement in the Kotlin DSL, at least for me and I found it to be incredibly frustrating.
## Conclusion
Again, these are my pain points with the Kotlin DSL. I still use it for some of my projects but I am not going to use it in new projects until Gradle addresses these pains.