I have written an sbt plugin that generates some sources and resources. It is hard coded to work in the Compile scope.
How can I make it work in the Test scope too, so I can use the plugin when running tests and it will look in and output to the correct folder?
For example, in various points in the code I refer to resourceManaged in Compile
which relates to src/main/resources
but when test
is run, I would like it to be resourceManaged in Test
when relates to src/test/resources
.
How do I abstract away the scope?