0__
0__

Reputation: 67330

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?

Upvotes: 15

Views: 3659

Answers (1)

yǝsʞǝla
yǝsʞǝla

Reputation: 16422

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.

Upvotes: 19

Related Questions