Phillip Schichtel
02/17/2026, 10:19 PMephemient
02/18/2026, 2:22 AMbuild.gradle.kts through either one of
plugins {
`kotlin-dsl`
`embedded-kotlin`
}
and you can use other Kotlin plugins with matching version
plugins {
kotlin("plugin.serialization") version embeddedKotlinVersion
}Sebastian Schuberth
02/18/2026, 7:37 AMembeddedKotlinVersion behave if the plugin is applied to a version of Gradle that does not support Kotlin DSL yet? And what would be the right solution to make a plugin written in Kotlin still work with such old Gradle versions?Martin
02/18/2026, 7:48 AMembedded-kotlin. I wrote a plugin to help with this: https://github.com/GradleUp/TapmocMartin
02/18/2026, 7:50 AMplugins {
id("com.gradleup.tapmoc")
}
tapmoc {
gradle(supportedGradleVersion)
}Martin
02/18/2026, 7:51 AMephemient
02/18/2026, 8:00 AMephemient
02/18/2026, 8:00 AMMartin
02/18/2026, 8:01 AMephemient
02/18/2026, 8:02 AMMartin
02/18/2026, 8:02 AMMartin
02/18/2026, 8:03 AMephemient
02/18/2026, 8:03 AMVampire
02/18/2026, 10:33 AMembeddedKotlin for a published plugin is a good idea?
For buildSrc or an included build like build-logic this is perfectly fine.
But for a published plugin, you tie to that version then.
You should use a Kotlin version that is supported by the oldest Gradle version you want to support.
Actually I would for compatibility reasons and less problems reasons never write a public Gradle plugin in Kotlin or Groovy, but always in the lowest Java version supported by the lowest Gradle version I want to support, so most probably in Java 8. 🙂Sebastian Schuberth
02/18/2026, 10:43 AMVampire
02/18/2026, 10:44 AMMartin
02/18/2026, 10:47 AMPhillip Schichtel
02/18/2026, 4:09 PM