Can someone kindly explain what each compile and Compile mean in this cryptic sbt idiom:
compile in Compile <<= (compile in Compile).dependsOn(Def.task {
println("task is running") // or whatever code here in the body
})
compile means the compile task, as opposed to, say, package
Compile means the compile configuration (derived from/matches Apache Ivy's configurations), as opposed to, say, Test
It might be easier to understand if you consider compile in Test which is the compile task scoped to the Test configuration and therefore compiles the test sources.
Moreover, the "unscoped" compile key isn't actually defined in the defaults of sbt so when you execute compile in the shell what's actually executed is compile in Compile due to sbt's "delegation rules", which you can read about in the Scope delegation sbt docs.
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