gpt4 book ai didi

scala - sbt 多项目构建在项目之间具有测试依赖性?

转载 作者:行者123 更新时间:2023-12-03 23:41:21 24 4
gpt4 key购买 nike

说我有

lazy val foo = Project(
id = "foo",
base = file("foo")
)

lazy val bar = Project(
id = "bar",
base = file("bar")
dependencies = Seq(foo) // only want that for `% "test"`....
)

怎么改 bar所以它只取决于测试范围内的 foo ?

最佳答案

你可以这样说:foo % "test->test" .这意味着测试取决于测试。您可以有各种其他选项,例如 foo % "test->test;compile->compile"这意味着它不仅取决于测试,还取决于编译(编译 -> 编译)。你也可以让测试依赖于编译 foo % "test->compile"等等。描述的很好here在文档中。

关于scala - sbt 多项目构建在项目之间具有测试依赖性?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21516090/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com