I still go with Groovy for scripting and tests with Spock.
Scripting is better because Kotlin doesn't have simple dependency management like Grape and compilation speed is way faster than Kotlin's. One of Kotlin's downsides is compilation speed and kts (kotlin script) is even slower.
Also, Groovy still has ton of utility methods in GDK not matched in kotlin stdlib.
Other than that, I'm sad to say, Groovy is dead or in process of dying.
I'm seeing companies rewriting Grails apps to Spring Boot and switching to Kotlin dsl in Gradle.
It's a shame really, such a fun language to program in.
I feel like the sweet spot is using groovy where it makes sense, like parsing unstructured xml and json, reading in files, pojos, and of course spock. I was never the biggest fan of grails.
I’ll have to check out Kotlin though, seems like the new wave for sure when it comes to simple readable jvm code.
as much as I love Groovy, it is sadly essentially a dead language. None of the language bugs and issue I have with it will probably ever get fixed. Kotlin has learned a lot of things from Groovy, and carries on a similar tradition of "java with syntactic sugar", though they've taken it slightly farther. And with the support of both JetBrains and Google behind it, it actually gets the fixes and improvements it needs, combined with all the growing community and overall momentum.
If you're using Groovy you might as well use Grails[1]. It's built on top of Spring Boot but gives you Groovy interfaces to most of the things you'd care about.
With Kotlin out there, groovy is completely redundant. Also development seems to have stalled a little. I removed it from a few projects I inherited to simplify my life a couple of times.
Scripting is better because Kotlin doesn't have simple dependency management like Grape and compilation speed is way faster than Kotlin's. One of Kotlin's downsides is compilation speed and kts (kotlin script) is even slower. Also, Groovy still has ton of utility methods in GDK not matched in kotlin stdlib.
Other than that, I'm sad to say, Groovy is dead or in process of dying. I'm seeing companies rewriting Grails apps to Spring Boot and switching to Kotlin dsl in Gradle. It's a shame really, such a fun language to program in.