How Can I define core gradle plugin without a version in version-catalog plugin

Hello Folks,

Currently, we’re working on migration from maven to gradle.
I have to say that gradle is more developer friendly and flexible. I like it.
Nowadays, I’m working on version-catalog on gradle to reuse common components.
In order to prevent plugin duplication, i want define plugin like this:

            plugin('plugin.codeCoverage', 'jacoco').version('')

if i don’t pass version, build is failed. If i pass the empty version again build is failed.

Is there any way to properly define core gradle plugin in the version-catalog?

Many thanks in advance,
With My best regards,

Hello @MuhendisBey

not sure if that what you want or not but

you can define the plugin with version in the root project and only declare the plugin in the sub project so all sub project would use the same version from the root

check this one

or you could use the pluginManagement
check this example

hope that help and have a nice day :slight_smile: