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.

Parameters

T

the plugin type.

See also


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

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


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.

Parameters

T

the plugin type.

See also


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.


inline fun <T : Plugin<*>> PluginContainer.apply(type: KClass<T>): T(source)
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

PluginContainer.apply

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

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

See also

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

PluginManager.apply

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

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

See also