Reputation: 31546
I am writing a custom task in SBT. I want the existing task of "test" depend on my custom task.
Basically, I want my custom task to execute just before someone calls "test" on my project.
How can I do this?
Upvotes: 1
Views: 67
Reputation: 2028
You can redefine test so that is depends on your task:
lazy val foo = taskKey[Unit]("...")
foo := println("Hello, world!")
test <<= test in Test dependsOn foo
Upvotes: 1