api / org.gradle.api / Script / apply

apply

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

Configures the delegate object for this script using plugins or scripts.

The given closure is used to configure an org.gradle.api.plugins.ObjectConfigurationAction which is then used to configure the delegate object.

Parameters

closure - The closure to configure the ObjectConfigurationAction.

abstract fun apply(options: MutableMap<String, *>): Unit

Configures the delegate object for this script using plugins or scripts.

The following options are available:

For more detail, see org.gradle.api.plugins.ObjectConfigurationAction.

Parameters

options - The options to use to configure the ObjectConfigurationAction.