public interface PluginDependencySpec
Can be used to specify the version of the plugin to use.
See PluginDependenciesSpec
for more information about declaring plugin dependencies.
Modifier and Type | Method | Description |
---|---|---|
PluginDependencySpec |
apply(boolean apply) |
Specifies whether the plugin should be applied to the current project.
|
PluginDependencySpec |
version(String version) |
Specify the version of the plugin to depend on.
|
PluginDependencySpec version(@Nullable String version)
plugins { id "org.company.myplugin" version "1.0" }
By default, dependencies have no (i.e. null
) version.
version
- the version string (null
for no specified version, which is the default)PluginDependencySpec apply(boolean apply)
This is useful when reusing classes from a plugin or to apply a plugin to sub-projects:
plugins { id "org.company.myplugin" version "1.0" apply false } subprojects { if (someCondition) { apply plugin: "org.company.myplugin" } }
apply
- whether to apply the plugin to the current project or not. Defaults to true