Edoardo Luppi
04/26/2025, 7:16 PMHexFormat inside buildSrc, I get the following error.
Not sure how to actually fix it.mbonnin
04/26/2025, 7:17 PMapiLevel = 1.8, are you using kotlin-dsl maybe?Edoardo Luppi
04/26/2025, 7:18 PMmbonnin
04/26/2025, 7:18 PMmbonnin
04/26/2025, 7:19 PMorg.jetbrains.kotlin.jvm plugin with sam-with-receiver plugin if you really need itEdoardo Luppi
04/26/2025, 7:22 PMkotlin-dsl is what I use to declare plugins. For example, without it I cannot specify
gradlePlugin {
plugins {
register("projectModule") {
...
}
register("projectDocs") {
...
}
}
}mbonnin
04/26/2025, 7:23 PMThis is my usual suspectsuspect is confirmed https://github.com/gradle/gradle/blob/a3cacb207fec727859be9354c1937da2e59004c1/pla[…]n/org/gradle/kotlin/dsl/plugins/dsl/KotlinDslCompilerPlugins.kt
mbonnin
04/26/2025, 7:23 PMjava-gradle-pluginEdoardo Luppi
04/26/2025, 7:24 PMmbonnin
04/26/2025, 7:24 PMkotlin-dsl is doing wayyyy too many thingsmbonnin
04/26/2025, 7:25 PMmbonnin
04/26/2025, 7:26 PMmbonnin
04/26/2025, 7:26 PMbuildSrc you control the build classpath so 🤷Edoardo Luppi
04/26/2025, 7:27 PMmbonnin
04/26/2025, 7:29 PMtasks.findByType<Foo>(), val task by registering , etc...), you can add gradleKotlinDsl() as a dependencymbonnin
04/26/2025, 7:32 PMEdoardo Luppi
04/26/2025, 7:34 PMWhile it is supported to override the target language version when using theHere https://github.com/gradle/gradle/pull/33041plugin to write build logickotlin-dsl
Edoardo Luppi
04/26/2025, 7:34 PMmbonnin
04/26/2025, 7:37 PMkotlin-dsl defaultsmbonnin
04/26/2025, 7:37 PMmbonnin
04/26/2025, 7:37 PMmbonnin
04/26/2025, 7:38 PMorg.jetbrains.kotlin.jvmEdoardo Luppi
04/26/2025, 7:42 PMEdoardo Luppi
04/26/2025, 7:58 PMEdoardo Luppi
04/26/2025, 7:58 PMmbonnin
04/26/2025, 8:08 PMbuildSrc issues 😄