api / org.gradle.api.plugins / ObjectConfigurationAction / plugin

plugin

abstract fun plugin(pluginClass: Class<out Plugin<Any>>): ObjectConfigurationAction

Adds a org.gradle.api.Plugin to use to configure the target objects. You can call this method multiple times, to use multiple plugins. Scripts and plugins are applied in the order that they are added.

Parameters

pluginClass - The plugin to apply.

Return
this

abstract fun plugin(pluginId: String): ObjectConfigurationAction

Adds a org.gradle.api.Plugin to use to configure the target objects. You can call this method multiple times, to use multiple plugins. Scripts and plugins are applied in the order that they are added.

Parameters

pluginId - The id of the plugin to apply.

Return
this