# PluginManager

@NonExtensible
interface PluginManager(source)

Facilitates applying plugins and determining which plugins have been applied to a PluginAware object.

#### Since

2.3

#### See also

PluginAware

## Functions

apply
Link copied to clipboard
abstract fun apply(type: Class<out Any>)
Applies the given plugin.
abstract fun apply(pluginId: String)
Applies the plugin with the given ID.
apply
Link copied to clipboard
inline fun PluginManager.apply(type: KClass<*>)

Kotlin extension function taking kotlin.reflect.KClass for org.gradle.api.plugins.PluginManager.apply.

findPlugin
Link copied to clipboard
@Nullable
abstract fun findPlugin(id: String): @Nullable AppliedPlugin
Returns the information about the plugin that has been applied with the given ID, or null if no plugin has been applied with the given ID.
hasPlugin
Link copied to clipboard
abstract fun hasPlugin(id: String): Boolean
Returns `true` if a plugin with the given ID has already been applied, otherwise `false`.
withPlugin
Link copied to clipboard
abstract fun withPlugin(id: String, action: Action<in AppliedPlugin>)
Executes the given action when the specified plugin is applied.