This message was deleted.
# community-support
s
This message was deleted.
c
The plug-in block is resolved early on as itโ€™s necessary to setup script environment; for version configuration one can use version catalogs to centralize plugin / dependency versions.
๐Ÿ‘ 1
m
Ok, thanks. But why it is working in groovy?
v
In Kotlin DSL the plugins block is extracted and applied to a dummy project to be able to find out which type-safe accessors need to be generated for this build script. Due to that, the plugins block in Kotlin DSL is even more restricted than the plugins block in Groovy DSL. I also strongly recommend you use version catalogs as @Chris Lee suggested. But you actually can make it work, by definig the plugin version not in the build scrip, but in the settings script within
pluignManagement { plugins { ... } }
where you can define default versions for plugins that are used without version and then just leave out the version in the build script.
๐Ÿ‘ 1