Rogach
Rogach

Reputation: 27250

How to make compile task depend on some other task in sbt?

For example, I need to do some pre-processing of source files before compiling. How do I ensure that sbt always runs this task before compile if compile was requested?

Upvotes: 2

Views: 267

Answers (1)

pr1001
pr1001

Reputation: 21962

Here's what I do to make sure my tests are run before I publish locally:

publishLocal <<= publishLocal dependsOn (test in Test)

For you I think you'd need something like

compile <<= compile dependsOn (myTask in myContext)

Upvotes: 3

Related Questions