api / org.gradle.kotlin.dsl / ScriptHandlerScope

ScriptHandlerScope

class ScriptHandlerScope : ScriptHandler

Receiver for the buildscript block.

Constructors

<init>

ScriptHandlerScope(scriptHandler: ScriptHandler)

Receiver for the buildscript block.

Properties

dependencies

val dependencies: <ERROR CLASS>

The dependencies of the script.

Functions

classpath

fun DependencyHandler.classpath(dependencyNotation: Any): Dependency?

Adds a dependency to the script classpath.

Extension Functions

closureOf

fun <T> Any.closureOf(action: T.() -> Unit): Closure<Any?>

Adapts a Kotlin function to a single argument Groovy Closure.

delegateClosureOf

fun <T> Any.delegateClosureOf(action: T.() -> Unit): Closure<Unit>

Adapts a Kotlin function to a Groovy Closure that operates on the configured Closure delegate.

repositories

fun ScriptHandler.repositories(configuration: RepositoryHandler.() -> Unit): Unit

withConvention

fun <ConventionType : Any, ReturnType> Any.withConvention(conventionType: KClass<ConventionType>, function: ConventionType.() -> ReturnType): ReturnType

Evaluates the given function against the convention plugin of the given conventionType.

withGroovyBuilder

fun <T> Any.withGroovyBuilder(builder: GroovyBuilderScope.() -> T): T

Executes the given builder against this object's GroovyBuilderScope.