apply
Applies the plugin with the given ID. Does nothing if the plugin has already been applied.
Plugins in the "org.gradle"
namespace can be applied directly via name. That is, the following two lines are equivalent…
pluginManager.apply "org.gradle.java"
pluginManager.apply "java"
Content copied to clipboard
Since
2.3
Parameters
plugin Id
the ID of the plugin to apply
Applies the given plugin. Does nothing if the plugin has already been applied.
The given class should implement the org.gradle.api.Plugin interface, and be parameterized for a compatible type of this
.
The following two lines are equivalent…
pluginManager.apply org.gradle.api.plugins.JavaPlugin
pluginManager.apply "org.gradle.java"
Content copied to clipboard
Since
2.3
Parameters
type
the plugin class to apply