I would like to move helper functions which I use often across projects into an own artifact. Yet, I cannot find the jar which includes e.g. KotlinSettingsScript which is in package org.gradle.kotlin.dsl. Is this somehow available? it looks like it is incorporated into gradle itself. Any idea?
basically this but as jar 🙂 https://gradle.github.io/kotlin-dsl-docs/api/org.gradle.kotlin.dsl/index.html
robstoll
08/08/2021, 1:03 PM
I found a solution/workaround by applying the
kotlin-dsl
plugin
v
Vampire
08/08/2021, 6:37 PM
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.
So if you are just after having the Gradle Kotlin DSL classes in your dependencies, you can use