How can I create an sbt plugin whose build definition depends on the code written in the plugin itself?
Since sbt is recursive, it is simple. Create or edit project/build.sbtand add
project/build.sbt
unmanagedSourceDirectories in Compile += new File("src/main/scala")
the old answer no longer works. Need a little tweak, add getAbsoluteFileat the end:
getAbsoluteFile
unmanagedSourceDirectories in Compile += file("src/main/scala").getAbsoluteFile