# apply

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

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

#### Since

0.9

#### See also

org.gradle.api.plugins.PluginContainer.apply

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

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

#### See also

org.gradle.api.plugins.PluginContainer.apply

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

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

#### Since

0.9

#### See also

org.gradle.api.Script.apply

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

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

#### See also

org.gradle.api.Script.apply

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

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

#### Since

2.3

#### See also

org.gradle.api.plugins.PluginManager.apply

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

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

#### Since

1.6

#### See also

org.gradle.api.plugins.PluginAware.apply

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

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

#### See also

org.gradle.api.plugins.PluginAware.apply

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

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`.

#### Since

5.6

#### Type Parameters

T

the plugin type.

#### See also

PluginAware.apply

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

Applies the given plugin or script.

#### Since

4.7

#### 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()(source)

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.

#### Since

5.6

#### Type Parameters

T

the plugin type.

#### See also

PluginAware.apply

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

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.

#### Since

4.1