# id

abstract fun id(id: String): PluginDependencySpec(source)

Add a dependency on the plugin with the given id.

    plugins {
        id "org.company.myplugin"
    }

Content copied to clipboard
Further constraints (e.g. version number) can be specified by the methods of the return value.

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

Content copied to clipboard
Plugins are automatically applied to the current script by default. This can be disabled using the `apply false` option:

    plugins {
        id "org.company.myplugin" version "1.3" apply false
    }

Content copied to clipboard
This is useful to reuse task classes from a plugin or to apply it to some other target than the current script.

#### Return

a mutable plugin dependency specification that can be used to further refine the dependency

#### Since

2.0

#### Parameters

id

the id of the plugin to depend on