Gradle Kotlin DSL for jmix projects

Hi everyone,

I was playing around with the buildscript of a jmix project these days and tried to convert the Groovy based build.gradle to a Kotlin based build.gradle.kts. However for one jmix speciality I did not yet find a solution on how to migrate it. I was wondering if this has already been solved by someone here or if someone has a good idea for a solution:

It’s about migrating this line of code
apply plugin: 'org.springframework.boot'

There is no version given here for the plugin, since the version should be determined by the jmix bom, which makes a lot of sense. However in the Kotlin DSL this construct doesn’t work and I need to specify a version for the plugin.

Even when I create a jmix project using Kotlin, then the build.gradle still is generated as Groovy instead of Kotlin, so I could also not find a solution there…

Does someone have an idea or a solution for this?

Dear support,

we are waiting for Kotlin DSL based build setup as well for a long time. Because we are writing and using Kotlin based plugins in other software development projects (non-Jmix), we are waiting to be able to use them with Jmix projects as well.

(When) will Jmix projects support Kotlin DSL based builds? Will they ever?

Thank you for reminding.
We’ll consider this. Created issue: https://youtrack.jmix.io/issue/JST-4787/Support-for-Kotlin-DSL-in-build-scripts

1 Like