如何在sbt控制台中设置多个设置?

时间:2014-06-12 19:55:13

标签: scala sbt

我知道我可以使用set来设置设置,但有没有办法从sbt控制台添加一堆设置?

1 个答案:

答案 0 :(得分:3)

您只需使用setSeq[Setting[_]]即可。 set接受一个Setting[_]Seq[Setting[_]]

> show name
[info] set-seq
> show version
[info] 1.0
> set Seq(name := "abc", version := "2.0")
[info] Defining *:name, *:version
[info] The new values will be used by *:description, *:isSnapshot and 8 others.
[info]  Run `last` for details.
[info] Reapplying settings...
[info] Set current project to abc (in build file:/Users/jacek/sandbox/set-seq/)
> show name
[info] abc
> show version
[info] 2.0

这类似于build.sbt个文件,其中单独的行可以是Setting[_]Seq[Setting[_]]