Reputation: 3033
I am trying to accomplish something like this:
lazy val customFlag = settingKey[Boolean]("My custom flag")
lazy val depOne = project ...
lazy val depTwo = project ...
lazy val myproject = project
.settings(
customFlag := false)
.dependsOn(if (customFlag) depOne else depTwo)
The idea being, that I could then use set customFlag := true
in the sbt console in order to change whether project myproject
depends on sub-project one or two.
I have a hunch at this point that the answer is that this is not possible. But it would be nice to get confirmation or an alternative to accomplish something similar.
Upvotes: 3
Views: 52