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.

hasPlugin

abstract fun hasPlugin(id: String): Boolean(source)

Returns true if the container has a plugin with the given id, false otherwise.

A plugin is only added to the container once its application has completed. Use hasPlugin to also detect a plugin that is currently being applied.

Since

0.7

Parameters

id

The id of the plugin


abstract fun hasPlugin(type: Class<out Plugin>): Boolean(source)

Returns true if the container has a plugin with the given type, false otherwise.

Since

0.7

Parameters

type

The type of the plugin