Hey there, we want to write a gradle plugin that t...
# gradle
j
Hey there, we want to write a gradle plugin that takes a kotlin source folder (some DSL), and then compile it and load a top level val from it. is this doable and how?
g
You can do that using buildSrc
j
thanks, but the point was to use the plugin to replace buildSrc
g
But why? You can wriate a plugin in buildSrc (kotlin-dsl also has example of this approach), the main difference with buildSrc approach is that you must apply it for each project where you want to use it
because you original message exactly describes how buildSrc works (without plugins)
m
does the latest release feature satisfy your use case? https://github.com/gradle/kotlin-dsl/releases/tag/v0.16.3 specifically the Precompiled script plugins section
j
it's very interesting, but not something that we need. our use case is that a plugin user would provide a kotlin file (our know config DSL, not for gradle) as a input to our plugin.