api / org.gradle.api.plugins / PluginCollection

PluginCollection

interface PluginCollection<T : Plugin<Any>> : DomainObjectSet<T>

A PluginCollection represents a collection of org.gradle.api.Plugin instances.

Parameters

- The type of plugins which this collection contains.

Functions

add

abstract fun add(element: T): Boolean

Unsupported.

addAll

abstract fun addAll(elements: Collection<T>): Boolean

Unsupported.

clear

abstract fun clear(): Unit

Unsupported.

matching

abstract fun matching(spec: Spec<in T>): PluginCollection<T>
abstract fun matching(closure: Closure<Any>): PluginCollection<T>

{@inheritDoc}

remove

abstract fun remove(o: T): Boolean

Unsupported.

removeAll

abstract fun removeAll(elements: Collection<T>): Boolean

Unsupported.

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.

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.

withType

abstract fun <S : T> withType(type: Class<S>): PluginCollection<S>

{@inheritDoc}

Inherited Functions

findAll

abstract fun findAll(spec: Closure<Any>): MutableSet<T>

{@inheritDoc}

Inheritors

PluginContainer

interface PluginContainer : PluginCollection<Plugin<Any>>

A PluginContainer is used to manage a set of org.gradle.api.Plugin instances applied to a particular project.

Plugins can be specified using either an id or type. The id of a plugin is specified using a META-INF/gradle-plugins/${id}.properties classpath resource.