Is it possible to override or modify built-in SBT tasks (like compile) to depend on custom tasks in my own Build.scala? Overriding e.g. \"compile\" directly is not possible sinc
Update: See arussell84's answer for a modern way to do this
You should be able to do it like this:
in a .sbt file:
compile <<= (compile in Compile) dependsOn jruby
Where jruby is a task key that you've defined in a project/something.scala file:
val jruby = TaskKey[Unit]("jruby", "run a jruby file")
Also, this isn't part of your question but you can just call regular Scala code:
compile <<= (compile in Compile) map { result =>
println("in compile, something")
result
}