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.

getPlugin

abstract fun getPlugin(id: String): Plugin(source)

Returns a plugin with the specified id if this plugin has been used in the project.

Since

0.9

Parameters

id

The id of the plugin

Throws

When there is no plugin with the given id.


abstract fun <T : Plugin?> getPlugin(type: Class<T>): T(source)

Returns a plugin with the specified type if this plugin has been used in the project.

Since

0.9

Parameters

type

The type of the plugin

Throws

When there is no plugin with the given type.