matrei
10/30/2026, 1:42 PMysb33r
10/30/2026, 2:36 PMmatrei
10/30/2026, 2:56 PMVampire
10/30/2026, 3:50 PMVampire
10/30/2026, 3:50 PMmatrei
10/30/2026, 4:10 PMAnd you get amazingly better IDE support when using a good IDE like IntelliJ IDEA or Android Studio, which you can never get with Groovy DSLInteresting, this is what I have not been able to reproduce. Could you show me some common Gradle build script usages where I cannot get type support with Groovy?
Vampire
10/30/2026, 4:16 PMtesting {
suites {
integTest(JvmTestSuite) {
useSpock('2.5-groovy-6.0')
dependencies {
implementation('org.apache.groovy:groovy:6+')
}
}
}
}
No IntelliSense or docs or anything for useSpock or implementation, and for dependencies it only provides because it assumes it is the one on project, not on the test suite.matrei
10/30/2026, 5:15 PMtesting {
suites {
register('integTest', JvmTestSuite) {
useSpock('2.5-groovy-6.0')
dependencies {
implementation 'org.apache.groovy:groovy:6+'
}
}
}
}Vampire
10/30/2026, 5:29 PMtesting {
suites {
integTest(JvmTestSuite) { JvmTestSuite foo ->
foo.useSpock('2.5-groovy-6.0')
foo.dependencies {
implementation('org.apache.groovy:groovy:6+')
}
}
}
}
Without the import this last version even shows a red error in the IDE while it works at runtime.
Groovy simply is a highly dynamic duck-typed language for which an IDE can only partly provide IntelliSense,
and if something goes wrong you only see the error at execution time and only if the problematic part is actually executed.
Kotlin on the other hand is a statically typed language that would fail on compilation already and for which the IDE can provide proper assistance because the types must be known and cannot come in dynamically.
Of course you can always write things in a way to help the IDE, like writing a method with strong typed parameters and then in there do the logic and so on,
but this is then non-idiomatic in itself already, also is harder to maintain, and you actually should not have to do it just to get better support by the IDE.
🤷♂️matrei
10/31/2026, 7:53 AMNoThat's strange, it seems to work for me. What am I missing?
Also if it would that's not really the point.Well, for me that was the point, because you said: "And you get amazingly better IDE support when using a good IDE like IntelliJ IDEA or Android Studio, which you can never get with Groovy DSL"
Vampire
10/31/2026, 2:41 PMJvmTestSuite, then your version behaves IDE-friendlier yes.
The point why it is not the point is - as I said - that you can surely write your build scripts in a special way, so that the IDE can understand and support them better.
But it only works for that special case when you do so and not for the normal case when you write idiomatic and recommended constructs.
And even with that specially written code, the IDE does not really help you much in writing it in the first place. All in all I keep my statement that you will get amazingly better IDE support with Kotlin DSL that you can never get with Groovy DSL.
Also for example take this:
testing {
suites {
test {
targets.configureEach {
testTask.configure {
jacoco {
destinationFile = layout.buildDirectory.file("foo").get().asFile
}
}
}
}
}
}
It is very cumbersome to write this in an IDE friendly way and the IDE and docs do not help you too much to do so.
And even if you did, it will be ugly non-idiomatic and hard to read for a human.Vampire
10/31/2026, 2:45 PMmatrei
10/31/2026, 5:10 PMtesting {
suites {
test {
targets.configureEach { JvmTestSuiteTarget target ->
target.testTask.configure { Test task ->
task.extensions.configure(JacocoTaskExtension) {
it.destinationFile =
project.layout.buildDirectory.file('foo').map { it.asFile }
}
}
}
}
}
}ysb33r
11/01/2026, 4:29 PMExtensiblePolymorphicDomainObjectContainer are involved
and having to unnecessarily say x.create('y', MyClass) or x.named('y', MyClass) etc. is a pain.Gianluca Sartori
11/02/2026, 8:39 AMVampire
11/02/2026, 8:58 AMThe Kotlin thing is a market/commercial/politic affair.No, it is not, it is a usability and convenience affair. And if you don't want to use it, then don't and live with the consequences. 🤷♂️ I don't think the DCL will be any "cheaper", it will enforce declarative usage which you can already do now. It will enable tooling to be able to better process the build scripts. If you - as noted - to fancy things or do not stick to conventions, I think with DCL it might be "less cheap" to do such things as you are forced to do them in a DCL-compatible way then. But I didn't play much with DCL yet, so. 🤷♂️ But again, use whatever tool, language, DSL, whatever, that suits you best.
Gianluca Sartori
11/02/2026, 9:06 AMysb33r
11/02/2026, 9:16 AMGianluca Sartori
11/02/2026, 10:01 AMVampire
11/02/2026, 12:35 PM