我正在将单个项目build.sbt
转换为多个项目build.sbt
,这始终是一个PITA。有一种晦涩的语法可以使插件设置可用。如在
seq(appbundle.settings: _*)
如何对子项目执行此操作?例如
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(
^
使用++
将它们添加到整体设置
lazy val views = Project(
id = "views",
base = file("views"),
dependencies = Seq(core),
settings = commonSettings ++ appbundle.settings ++ Seq(
name := "views",
description := ...
)
)