Sbt plugin that depends on itself

How can I create an sbt plugin whose build definition depends on the code written in the plugin itself?

+5
source share
2 answers

Since sbt is recursive, it is simple. Create or edit project/build.sbtand add

unmanagedSourceDirectories in Compile += new File("src/main/scala")
+6
source

the old answer no longer works. Need a little tweak, add getAbsoluteFileat the end:


    unmanagedSourceDirectories in Compile += file("src/main/scala").getAbsoluteFile

0
source

All Articles