我想更改测试文件的源目录,但只是暂时在当前会话中。我尝试了以下方法:
> scalaSource in Test := baseDirectory.value / "test-src"
[error] Expected ID character
[error] Not a valid command: scalaSource
[error] Expected project ID
[error] Expected configuration
[error] Expected ':' (if selecting a configuration)
[error] Expected key
[error] Expected '::'
[error] Expected end of input.
[error] scalaSource in Test := baseDirectory.value / "test-src"
答案 0 :(得分:2)
在sbt shell中,您需要使用set
command将更改应用于当前项目的设置:
> set scalaSource in Test := baseDirectory.value / "test-src"
如果您想将session save
留在build.sbt
,则可以使用{{1}}。