version

abstract fun version(@Nullable version: String): PluginDependencySpec(source)

Specify the version of the plugin to depend on.

plugins {
    id "org.company.myplugin" version "1.0"
}

By default, dependencies have no (i.e. null) version.

Core plugins must not include a version number specification. Community plugins must include a version number specification.

Return

this

Parameters

version

the version string (null for no specified version, which is the default)


Specify the version of the plugin to depend on.

plugins {
    id "org.company.myplugin" version libs.versions.myplugin
}

Return

this

Since

7.2

Parameters

version

the version provider, for example as found in a version catalog