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 TypeMethodDescriptionvoidConfigure an extension attribute by appending the specified value.voidappendWithType(String target, String value, String type) Configure an extension attribute by appending the specified value and type.voidSet a extension attribute.voidattributeWithType(String target, String value, String type) Set an extension attribute with a type.build()Build aGradleExtensionwith the current state of this builder.voidimportType(String type) Import a given type.voidInvoke an extension method.voidinvoke(String target, Collection<String> arguments) Invoke an extension method.voidinvokeWithType(String target, String type, String... arguments) Invoke an extension method.voidinvokeWithType(String target, String type, Collection<String> arguments) Invoke an extension method.voidnested(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- aConsumerto customize the nested extension
-
build
Build aGradleExtensionwith the current state of this builder.- Returns:
- a
GradleExtension
-