[英]sbt multi-project build with test dependency between projects?
Say I have 说我有
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"`....
)
How can I change bar
so that it only depends on foo in the test scope ? 如何更改
bar
以使其仅依赖于测试范围中的foo ?
You can say something like this: foo % "test->test"
. 你可以这样说:
foo % "test->test"
。 This means test depends on test. 这意味着测试取决于测试。 You can have various other options like
foo % "test->test;compile->compile"
which means it depends not only on test but also on compile (compile -> compile). 你可以有各种其他选项,比如
foo % "test->test;compile->compile"
,这意味着它不仅取决于测试,还取决于编译(compile - > compile)。 You can also have test depend on compile foo % "test->compile"
and so on. 你也可以测试依赖于编译
foo % "test->compile"
等等。 It's described well here in documentation. 它描述以及这里的文档。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.