public class GradlePluginContainer extends Object
Constructor and Description |
---|
GradlePluginContainer() |
Modifier and Type | Method and Description |
---|---|
void |
add(String id)
Add a
GradlePlugin to the standard plugins block with the specified
id. |
void |
add(String id,
Consumer<StandardGradlePlugin> plugin)
Add a
GradlePlugin to the standard plugins block with the specified
id and Consumer to customize the object. |
void |
apply(String id)
Apply a
GradlePlugin with the specified id. |
boolean |
has(String id)
Specify if this container has a plugin with the specified id.
|
boolean |
isEmpty()
Specify if this container is empty.
|
boolean |
remove(String id)
Remove the plugin with the specified
id . |
Stream<GradlePlugin> |
values()
Returns a
Stream of registered GradlePlugin s. |
public boolean isEmpty()
true
if no GradlePlugin
is addedpublic boolean has(String id)
id
- the identifier of a gradle plugintrue
if a plugin with the specified id
existspublic Stream<GradlePlugin> values()
Stream
of registered GradlePlugin
s.GradlePlugin
spublic void add(String id)
GradlePlugin
to the standard plugins
block with the specified
id. Does nothing if the plugin has already been added.id
- the id of the pluginadd(String, Consumer)
public void add(String id, Consumer<StandardGradlePlugin> plugin)
GradlePlugin
to the standard plugins
block with the specified
id and Consumer
to customize the object. If the plugin has already been
added, the consumer can be used to further tune the existing plugin configuration.id
- the id of the pluginplugin
- a Consumer
to customize the GradlePlugin
public void apply(String id)
GradlePlugin
with the specified id. Does nothing if the plugin has
already been applied.id
- the id of the pluginpublic boolean remove(String id)
id
.id
- the id of the plugin to removetrue
if such a plugin was registered, false
otherwiseCopyright © 2022 Pivotal Software, Inc.. All rights reserved.