Arjan van Wieringen
03/16/2024, 6:16 PMplugins {
`java-gradle-plugin`
`kotlin-dsl`
}
sourceSets {
main {
kotlin {
srcDir("src/main/kotlin")
}
}
}
https://docs.gradle.org/current/userguide/custom_plugins.html#sec:custom_plugins_standalone_project
EDIT: well.... actually that just works, after removing kotlin-dsl
. I am a bit uncertain whether or not kotlin-dsl was needed. I suppose it wasnt. A plugin is 'just' another project.hfhbd
03/16/2024, 6:24 PMArjan van Wieringen
03/16/2024, 6:42 PMgradlePlugin {
plugins {
create("wiredPlugin") {
id = "nl.helicotech.wired.plugin"
implementationClass = "nl.helicotech.wired.plugin.WiredPlugin"
}
}
}
Vampire
03/16/2024, 7:16 PMkotlin-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.