Groovy Builder Scope
Provides a dynamic dispatching DSL with Groovy semantics for better integration with plugins that rely on Groovy builders such as the core maven
plugin.
It supports Groovy keyword arguments and arbitrary nesting, for instance, the following Groovy code:
repository(url: "scp://repos.mycompany.com/releases") {
authentication(userName: "me", password: "myPassword")
}
Can be mechanically translated to the following Kotlin with the aid of withGroovyBuilder
:
withGroovyBuilder {
"repository"("url" to "scp://repos.mycompany.com/releases") {
"authentication"("userName" to "me", "password" to "myPassword")
}
}
See also
Properties
The delegate of this GroovyBuilderScope.
Functions
Returns true if the object has a property named name.
Invokes with Groovy semantics and no arguments.
Invokes with Groovy semantics and arguments.
Invokes with Groovy semantics and named keywordArguments.
Invokes with Groovy semantics, no arguments, and provides a nested GroovyBuilderScope.
Invokes with Groovy semantics, arguments and provides a nested GroovyBuilderScope.
Invokes with Groovy semantics, named keywordArguments, and provides a nested GroovyBuilderScope.