name.remal.gradle_plugins.dsl.extensions.groovy.lang.Closure.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gradle-plugins-kotlin-dsl Show documentation
Show all versions of gradle-plugins-kotlin-dsl Show documentation
Remal Gradle plugins: gradle-plugins-kotlin-dsl
package name.remal.gradle_plugins.dsl.extensions
import groovy.lang.Closure
import org.gradle.api.Action
import org.gradle.api.specs.Spec
import org.gradle.api.specs.Specs.convertClosureToSpec
import org.gradle.util.ConfigureUtil.configure
fun Closure<*>.toConfigureAction(): Action = Action { configure(this, it) }
fun Closure<*>.toConfigureKotlinFunction() = { arg: T -> configure(this, arg); Unit }
fun Closure<*>.toSpec(): Spec = convertClosureToSpec(this)