wakingrufus
07/21/2021, 8:21 PMplugins {
id 'java-gradle-plugin'
id 'org.jetbrains.kotlin.jvm'
}
dependencies {
compileOnly gradleApi()
implementation "org.scalastyle:scalastyle_2.12:1.0.0"
testCompileOnly gradleApi()
testCompile 'junit:junit:4.13.1'
testImplementation "org.junit.jupiter:junit-jupiter-api:$junit5Version"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junit5Version"
testImplementation("org.junit.jupiter:junit-jupiter-params:$junit5Version")
testImplementation "org.assertj:assertj-core:$assertJVersion"
}
and i cant seem to access the project.tasks.register<TaskType>(name: String)
among other thingsCasey Brooks
07/21/2021, 8:44 PMtapchicoma
07/21/2021, 8:52 PMVampire
07/21/2021, 10:40 PMcompileOnly gradleKotlinDsl()
But actually you usually want to apply the kotlin-dsl
or kotlin-dsl.base
plugins to for example also get the SAM conversion for Gradle interfaces.
kotlin-dsl
applies java-gradle-plugin
, kotlin-dsl.base
, and kotlin-dsl.precompiled-script-plugins
plugins
kotlin-dsl.base
plugin applies embedded-kotlin
, adds gradleKotlinDsl()
to the dependencies of compileOnly
and testImplementation
configurations, and configures the Kotlin DSL compiler plugins for example for proper SAM conversion for Action
and similar.Vampire
07/21/2021, 10:42 PMplugins
block. But all the standard things like register
with type parameter and similar is available in that dependency.eskatos
07/22/2021, 5:58 AM