Class GradlePluginContainer
java.lang.Object
io.spring.initializr.generator.buildsystem.gradle.GradlePluginContainer
A container for gradle plugins.
- Author:
- HaiTao Zhang
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd aGradlePluginto the standardpluginsblock with the specified id.voidadd(String id, Consumer<StandardGradlePlugin> plugin) Add aGradlePluginto the standardpluginsblock with the specified id andConsumerto customize the object.voidApply aGradlePluginwith the specified id.booleanSpecify if this container has a plugin with the specified id.booleanisEmpty()Specify if this container is empty.booleanRemove the plugin with the specifiedid.values()Returns aStreamof registeredGradlePlugins.
-
Constructor Details
-
GradlePluginContainer
public GradlePluginContainer()
-
-
Method Details
-
isEmpty
public boolean isEmpty()Specify if this container is empty.- Returns:
trueif noGradlePluginis added
-
has
Specify if this container has a plugin with the specified id.- Parameters:
id- the identifier of a gradle plugin- Returns:
trueif a plugin with the specifiedidexists
-
values
Returns aStreamof registeredGradlePlugins.- Returns:
- a stream of
GradlePlugins
-
add
Add aGradlePluginto the standardpluginsblock with the specified id. Does nothing if the plugin has already been added.- Parameters:
id- the id of the plugin- See Also:
-
add
Add aGradlePluginto the standardpluginsblock with the specified id andConsumerto customize the object. If the plugin has already been added, the consumer can be used to further tune the existing plugin configuration.- Parameters:
id- the id of the pluginplugin- aConsumerto customize theGradlePlugin
-
apply
Apply aGradlePluginwith the specified id. Does nothing if the plugin has already been applied.- Parameters:
id- the id of the plugin
-
remove
Remove the plugin with the specifiedid.- Parameters:
id- the id of the plugin to remove- Returns:
trueif such a plugin was registered,falseotherwise
-