我知道我可以使用set
来设置设置,但有没有办法从sbt控制台添加一堆设置?
答案 0 :(得分:3)
您只需使用set
和Seq[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[_]]
。