Class GradleTask.Builder
java.lang.Object
io.spring.initializr.generator.buildsystem.gradle.GradleTask.Builder
- Enclosing class:
- GradleTask
A builder for
GradleTask
.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Configure a task attribute by appending the specified value.void
Set a task attribute.build()
Build aGradleTask
with the current state of this builder.void
Invoke a task method.void
nested
(String property, Consumer<GradleTask.Builder> customizer) Customize a nested task for the specified property.
-
Constructor Details
-
Builder
-
Builder
-
-
Method Details
-
attribute
Set a task attribute.- Parameters:
target
- the name of the attributevalue
- the value
-
append
Configure a task attribute by appending the specified value.- Parameters:
target
- the name of the attributevalue
- the value to append
-
invoke
Invoke a task method.- Parameters:
target
- the name of the methodarguments
- the arguments
-
nested
Customize a nested task for the specified property. If such nested task has already been added, the consumer can be used to further tune the existing task configuration.- Parameters:
property
- a task propertycustomizer
- aConsumer
to customize the nested task
-
build
Build aGradleTask
with the current state of this builder.- Returns:
- a
GradleTask
-