0

I found the an SBT-recipe for parameters and Build Environment.

I would now like to be able to change buildEnv while running SBT. Basically

I can't manage to find a programmatic solution for:

> set every buildEnv := BuildEnvPlugin.autoImport.BuildEnv.Development or running BuiltinCommands.set from a wrapping command.

My basic solution doesn't scale to sub-/aggregated projects val devCmd = Command.command("dev"){ state => Project extract state appendWithSession (Seq(buildEnv := BuildEnv.Development), state) }

How can I change all aggregated settings as well?

Stefan K.
  • 7,701
  • 6
  • 52
  • 64

1 Answers1

0

I just didn't find this simple solution initially:

override def projectSettings: Seq[Setting[_]] = commands += devCmd
lazy val devCmd = BasicCommands
    .newAlias("dev", "set every buildEnv := BuildEnvPlugin.autoImport.BuildEnv.Development")
Stefan K.
  • 7,701
  • 6
  • 52
  • 64