api / org.gradle.api.plugins / PluginCollection / whenPluginAdded

whenPluginAdded

abstract fun whenPluginAdded(action: Action<in T>): Action<in T>

Adds an Action to be executed when a plugin is added to this collection.

Parameters

action - The action to be executed

Return
the supplied action

abstract fun whenPluginAdded(closure: Closure<Any>): Unit

Adds a closure to be called when a plugin is added to this collection. The plugin is passed to the closure as the parameter.

Parameters

closure - The closure to be called