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?
thanks, but the point was to use the plugin to replace buildSrc
g
gildor
04/18/2018, 6:29 AM
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)
j
jakiej
04/18/2018, 5:18 PM
sorry that the original message was not informative enough: the plugin is for other people, who does not know much about buildSrc, or simply does not want to add buildSrc to their projects.
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.
it actually worked for us to use kts instead of kt. however IDEA is all red for our own DSL with kts.
could IDEA pickup jars in buildscript classpath for highlight?