Ok we will use this variant then, and wait for https://github.com/gradle/gradle/issues/9268 to be able to use an idiomatic syntax with the Kotlin DSL.