api / org.gradle.kotlin.dsl / kotlin.Any / closureOf

closureOf

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

Adapts a Kotlin function to a single argument Groovy Closure.

Parameters

T - the expected type of the single argument to the closure.

action - the function to be adapted.

See Also

KotlinClosure1