# apply

inline fun <T : Plugin<*>> PluginContainer.apply(type: KClass<T>): T
inline fun <T : Plugin<*>> PluginContainer.apply(type: KClass<T>): T

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

#### See also

PluginContainer.apply

inline fun Script.apply(vararg options: Pair<String, Any>)
inline fun Script.apply(vararg options: Pair<String, Any>)

Kotlin extension function for org.gradle.api.Script.apply.

#### See also

Script.apply

inline fun PluginManager.apply(type: KClass<*>)
inline fun PluginManager.apply(type: KClass<*>)

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

#### Since

2.3

#### See also

PluginManager.apply

inline fun PluginAware.apply(vararg options: Pair<String, Any>)
inline fun PluginAware.apply(vararg options: Pair<String, Any>)

Kotlin extension function for org.gradle.api.plugins.PluginAware.apply.

#### See also

PluginAware.apply

inline fun <T : Plugin<Gradle>> Gradle.apply()
inline fun <T : Plugin<Project>> Project.apply()
inline fun <T : Plugin<Settings>> Settings.apply()

Applies the plugin of the given type T. Does nothing if the plugin has already been applied.

The given class should implement the Plugin interface, and be parameterized for a compatible type of `this`.

#### Parameters

T

the plugin type.

#### See also

PluginAware.apply

fun PluginAware.apply(from: Any? = null, plugin: String? = null, to: Any? = null)

Applies the given plugin or script.

#### Parameters

from

a script to apply, evaluated as per Project.file

plugin

a id of the plugin to apply

to

the plugin target object or collection of objects, target is self when null

#### See also

PluginAware.apply

inline fun <T : Plugin<*>> PluginAware.apply()

Applies the plugin of the given type T. Does nothing if the plugin has already been applied.

The given class should implement the Plugin interface.

#### Parameters

T

the plugin type.

#### See also

PluginAware.apply

infix fun PluginDependencySpec.apply(apply: Boolean): PluginDependencySpec

Specifies whether the plugin should be applied to the current project. Otherwise it is only put on the project's classpath.

Infix version of PluginDependencySpec.apply.