# version

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

Specify the version of the plugin to depend on.

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

Content copied to clipboard

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)

open fun version(version: Provider<String>): PluginDependencySpec(source)

Specify the version of the plugin to depend on.

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

Content copied to clipboard

#### Return

this

#### Since

7.2

#### Parameters

version

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