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:
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 your build.sbt.
lazy val anotherTask = taskKey[Unit]("another task")
anotherTask := println("hello")
compile in Compile := {
val compileAnalysis = (compile in Compile).value
anotherTask.value
compileAnalysis
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With