Slackbot
08/12/2022, 11:51 PMVampire
08/13/2022, 4:36 PMFleshgrinder
08/14/2022, 6:37 AMkotlin-dsl
. You define your plugin as script plugin instead and then you apply it in your own build script. It will be compiled twice and everything needs to be defined inside the script (with all the downsides), but now you can.Vampire
08/14/2022, 12:28 PMFleshgrinder
08/14/2022, 12:30 PMbuild.gradle.kts
plugins {
`kotlin-dsl`
}
apply(from = "src/main/kotlin/my-plugin.gradle.kts")
src/main/kotlin/my-plugin.gradle.kts
// do something
Vinay Potluri
08/15/2022, 7:56 PMbuildSrc/src/main/kotlin/myplugin.kt
then it can be applied within the build script of the same project.
Ref: https://docs.gradle.org/current/userguide/custom_plugins.html#sec:packaging_a_plugin