Class GradleExtension.Builder
java.lang.Object
io.spring.initializr.generator.buildsystem.gradle.GradleExtension.Builder
- Enclosing class:
- GradleExtension
A builder for
GradleExtension
.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Configure an extension attribute by appending the specified value.void
appendWithType
(String target, String value, String type) Configure an extension attribute by appending the specified value and type.void
Set a extension attribute.void
attributeWithType
(String target, String value, String type) Set an extension attribute with a type.build()
Build aGradleExtension
with the current state of this builder.void
importType
(String type) Import a given type.void
Invoke an extension method.void
invoke
(String target, Collection<String> arguments) Invoke an extension method.void
invokeWithType
(String target, String type, String... arguments) Invoke an extension method.void
invokeWithType
(String target, String type, Collection<String> arguments) Invoke an extension method.void
nested
(String name, Consumer<GradleExtension.Builder> customizer) Customize a nested extension for the specified name.
-
Constructor Details
-
Builder
-
-
Method Details
-
importType
Import a given type.- Parameters:
type
- the type to import
-
attribute
Set a extension attribute.- Parameters:
target
- the name of the attributevalue
- the value
-
attributeWithType
Set an extension attribute with a type.- Parameters:
target
- the name of the attributevalue
- the valuetype
- the type to import
-
append
Configure an extension attribute by appending the specified value.- Parameters:
target
- the name of the attributevalue
- the value to append
-
appendWithType
Configure an extension attribute by appending the specified value and type.- Parameters:
target
- the name of the attributevalue
- the value to appendtype
- the type to import
-
invoke
Invoke an extension method.- Parameters:
target
- the name of the methodarguments
- the arguments
-
invoke
Invoke an extension method.- Parameters:
target
- the name of the methodarguments
- the arguments
-
invokeWithType
Invoke an extension method.- Parameters:
target
- the name of the methodtype
- the type to importarguments
- the arguments
-
invokeWithType
Invoke an extension method.- Parameters:
target
- the name of the methodtype
- the type to importarguments
- the arguments
-
nested
Customize a nested extension for the specified name. If such nested extension has already been added, the consumer can be used to further tune the existing extension configuration.- Parameters:
name
- a extension namecustomizer
- aConsumer
to customize the nested extension
-
build
Build aGradleExtension
with the current state of this builder.- Returns:
- a
GradleExtension
-