如何" seq"多项目sbt构建中的插件设置

时间:2014-07-02 09:01:20

标签: scala sbt subproject

我正在将单个项目build.sbt转换为多个项目build.sbt,它始终是PITA。有一种模糊的语法可以使插件设置可用。例如。前

seq(appbundle.settings: _*)

如何对子项目执行此操作。 E.g。

lazy val views = Project(
  id        = "views",
  base      = file("views"),
  dependencies = Seq(core),
  settings  = commonSettings ++ Seq(
    seq(appbundle.settings: _*),    // ???
    name        := "views",
    description := ...
  )
)

这只是给我一个错误

 found   : Seq[sbt.Def.SettingsDefinition]
 required: Seq[sbt.Def.Setting[_]]
  settings  = commonSettings ++ Seq(
                             ^

1 个答案:

答案 0 :(得分:1)

使用++将其添加到整体设置

lazy val views = Project(
  id        = "views",
  base      = file("views"),
  dependencies = Seq(core),
  settings  = commonSettings ++ appbundle.settings ++ Seq(
    name        := "views",
    description := ...
  )
)