For AI agents: the documentation index is at https://docs.gradle.org/llms.txt. Request any page with the header Accept: text/markdown to get Markdown. User manual pages are also available as Markdown by replacing .html with .md in the URL.

plugin

abstract fun plugin(pluginClass: Class<out Plugin>): ObjectConfigurationAction(source)

Adds a org.gradle.api.Plugin to use to configure the target objects. You can call this method multiple times, to use multiple plugins. Scripts and plugins are applied in the order that they are added.

Return

this

Since

0.9

Parameters

pluginClass

The plugin to apply.


abstract fun plugin(pluginId: String): ObjectConfigurationAction(source)

Adds a org.gradle.api.Plugin to use to configure the target objects. You can call this method multiple times, to use multiple plugins. Scripts and plugins are applied in the order that they are added.

Return

this

Since

0.9

Parameters

pluginId

The id of the plugin to apply.