I need a task myTask to get executed after compile task is finished. I have tried a number of things I've found on this forum:
- using dependsOn --> only working if "sbt myTask" is explicitly called on sbt prompt. But I need myTask to be executed automatically, whenever compile is executed.
- using triggeredBy --> myTask gets never called
Doing the other way around works like a charm, although it is not what I want. I mean, doing:
(compile in Compile) <<= (compile in Compile) dependsOn myTask
makes myTask to get executed in the first place, and then the compile task is executed. But I need myTask to get executed after compile is over.
Any idea?
Thanks a lot.
Here is one way to modify the compile task to invoke
anotherTask
. Add the following in yourbuild.sbt
.