为子项目运行sb​​t命令/从插件设置每个命令?

时间:2018-06-25 17:30:47

标签: scala sbt sbt-native-packager sbt-plugin

我找到了一个SBT-recipe for parameters and Build Environment

我现在希望能够在运行SBT时更改n <- 60 set.seed(21) a <- data.frame( DATE = rev(seq.Date(as.Date("2018-01-01"), as.Date("2018-06-15"), "days"))[1:n], OPERATION_STATUS = sample(c("PASS","FAIL"), n, replace = TRUE), CRIT_CODE = sample(c("A", "B", "C"), n, replace = TRUE) ) }) } 。基本上

我无法找到以下程序化解决方案:

buildEnv或通过包装命令运行> set every buildEnv := BuildEnvPlugin.autoImport.BuildEnv.Development

我的基本解决方案无法扩展到子项目/汇总项目 BuiltinCommands.set

如何更改所有汇总设置?

1 个答案:

答案 0 :(得分:0)

我最初没有找到这个简单的解决方案:

override def projectSettings: Seq[Setting[_]] = commands += devCmd
lazy val devCmd = BasicCommands
    .newAlias("dev", "set every buildEnv := BuildEnvPlugin.autoImport.BuildEnv.Development")