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.

type

abstract fun type(pluginClass: Class<out Any>): ObjectConfigurationAction(source)

Adds the plugin implemented by the given class to the target.

The class is expected to either implement Plugin, or extend org.gradle.model.RuleSource. An exception will be thrown if the class is not a valid plugin implementation.

Return

this

Since

2.3

Parameters

pluginClass

the plugin to apply