public interface PluginTarget
Typically, represented by a Gradle Project
.
Modifier and Type | Method and Description |
---|---|
void |
apply(GradlePlugin<?> plugin)
Applies the given plugin.
|
void |
apply(PluginScript pluginScript)
Applies the given plugin script.
|
boolean |
isApplied(GradlePlugin<?> plugin)
Checks if the given plugin is already applied.
|
default boolean |
isNotApplied(GradlePlugin<?> plugin)
Checks if the given plugin is not applied yet.
|
<P extends org.gradle.api.Plugin<org.gradle.api.Project>> |
with(GradlePlugin<P> plugin,
java.util.function.Consumer<P> action)
Executes the given
action if the given plugin is applied. |
<P extends org.gradle.api.Plugin<org.gradle.api.Project>> void with(GradlePlugin<P> plugin, java.util.function.Consumer<P> action)
action
if the given plugin is applied.
If the plugin is already applied, the action is executed at once. If the plugin is NOT applied, the action is only executed when and it the plugin will be applied.
plugin
- the trigger pluginaction
- the action to executevoid apply(GradlePlugin<?> plugin)
void apply(PluginScript pluginScript)
boolean isApplied(GradlePlugin<?> plugin)
default boolean isNotApplied(GradlePlugin<?> plugin)