api / org.gradle.api.plugins / PluginContainer / withId

withId

@Incubating abstract fun withId(pluginId: String, action: Action<in Plugin<Any>>): Unit

Executes or registers an action for a plugin with given id. If the plugin was already applied, the action is executed. If the plugin is applied sometime later the action will be executed after the plugin is applied. If the plugin is never applied, the action is never executed. The behavior is similar to #withType(Class, org.gradle.api.Action).

Parameters

pluginId - the id of the plugin

action - the action