Provide both Kotlin and Groovy DSL samples in the README file
jbartok opened this issue · 3 comments
jbartok commented
Provide both Kotlin and Groovy DSL samples in the README file
StefMa commented
Do we really want this? 🤔
Here we have already an improvement so applying works for both DSLs.
The only change we could do is:
- resolverClass.set(org.gradle.toolchains.foojay.FoojayToolchainResolver::class.java)
+ resolverClass = org.gradle.toolchains.foojay.FoojayToolchainResolver
But since starting with Gradle 8.2 Kotlin DSL will be the default, I would say the need here is not big enough to add the Groovy DSL to the README.
What do you think?
If you think we still should add it, I'm happy to do that.
I would go with that:
Kotlin DSL
plugins {
id("org.gradle.toolchains.foojay-resolver") version "0.4.0"
}
toolchainManagement {
jvm {
javaRepositories {
repository("foojay") {
resolverClass.set(org.gradle.toolchains.foojay.FoojayToolchainResolver::class.java)
}
}
}
}
Groovy DSL
plugins {
id("org.gradle.toolchains.foojay-resolver") version "0.4.0"
}
toolchainManagement {
jvm {
javaRepositories {
repository("foojay") {
resolverClass = org.gradle.toolchains.foojay.FoojayToolchainResolver
}
}
}
}
jbartok commented
I would say it should still be added because, even though Kotlin is the preferred DSL, the Groovy DSL is also fully supported with no end of its life in sight.