I want to modify the publish task and execute it conditionally (0.13.8). Here is what I tried (simplified):
publish := {
Def.taskDyn {
if (true) {
Def.task {
publish.value
}
} else {
Def.task()
}
}.value
}
This fails with the following exception:
[error] (root/*:publish) sbt.Init$RuntimeUndefined: References to undefined settings at runtime.
Any ideas?
Try this:
publish := {
if( true ) {
publish
} else Def.task {
println("something else")
}
}.value
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