# GroovyBuilderScope

interface GroovyBuilderScope : GroovyObject

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")
    }

Content copied to clipboard

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")
      }
    }

Content copied to clipboard

#### See also

withGroovyBuilder

## Types

Companion
Link copied to clipboard
object Companion

## Properties

delegate
Link copied to clipboard
abstract val delegate: Any

The delegate of this GroovyBuilderScope.

## Functions

getMetaClass
Link copied to clipboard
abstract fun getMetaClass(): MetaClass
getProperty
Link copied to clipboard
open fun getProperty(p0: String): Any
hasProperty
Link copied to clipboard
@Incubating
abstract fun hasProperty(name: String): Boolean

Returns true if the object has a property named name.

invoke
Link copied to clipboard
open operator fun String. invoke(): Any?

Invokes with Groovy semantics and no arguments.

abstract operator fun String. invoke(vararg arguments: Any?): Any?

Invokes with Groovy semantics and arguments.

open operator fun String. invoke(vararg keywordArguments: Pair<String, Any?>): Any?

Invokes with Groovy semantics and named keywordArguments.

open operator fun <T> String. invoke(builder: GroovyBuilderScope.() -> T): Any?

Invokes with Groovy semantics, no arguments, and provides a nested GroovyBuilderScope.

open operator fun <T> String. invoke(vararg arguments: Any?, builder: GroovyBuilderScope.() -> T): Any?

Invokes with Groovy semantics, arguments and provides a nested GroovyBuilderScope.

open operator fun <T> String. invoke(vararg keywordArguments: Pair<String, Any?>, builder: GroovyBuilderScope.() -> T): Any?

Invokes with Groovy semantics, named keywordArguments, and provides a nested GroovyBuilderScope.

invokeMethod
Link copied to clipboard
open fun invokeMethod(p0: String, p1: Any): Any
setMetaClass
Link copied to clipboard
abstract fun setMetaClass(p0: MetaClass)
setProperty
Link copied to clipboard
open fun setProperty(p0: String, p1: Any)