简体   繁体   中英

How to “seq” plugin settings in a multi-project sbt build

I am converting a single-project build.sbt to a multi-project build.sbt , which is always a PITA. There is this obscure syntax to make plugin settings available. Eg before

seq(appbundle.settings: _*)

How do I do this with sub-projects. Eg

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

This just gives me an error

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

Add them using ++ to the overall settings

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM