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 TypeMethodDescriptionvoidConfigure a task attribute by appending the specified value.voidSet a task attribute.build()Build aGradleTaskwith the current state of this builder.voidInvoke a task method.voidnested(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- aConsumerto customize the nested task
-
build
Build aGradleTaskwith the current state of this builder.- Returns:
- a
GradleTask
-