Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

sbt multi-project build with test dependency between projects?

Tags:

scala

sbt

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?

like image 613
0__ Avatar asked Feb 02 '14 20:02

0__


1 Answers

You can say something like this: 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). You can also have test depend on compile foo % "test->compile" and so on. It's described well here in documentation.

like image 169
yǝsʞǝla Avatar answered Oct 04 '22 18:10

yǝsʞǝla