3

My project has several module, like

  • server (JVM)
  • sharedJVM
  • sharedJS
  • client (JS)

At the moment testing does only work for the JVM modules.

What I can do is:

sbt sharedJVM/test server/test

What I want do is:

sbt test

I couldn't find a Setting to do this.

pme
  • 14,156
  • 3
  • 52
  • 95

1 Answers1

1

You can take advantage of aggregatedProjects as below:

lazy val aggregatedProjects: Seq[ProjectReference] = Seq(
  server,
  sharedJVM
)

lazy val root = project
  .in(file("."))
  .aggregate(aggregatedProjects: _*)

Once you do this, then whatever command you execute at root project level will be propagated to aggregated projects. Which means by running sbt test will execute sbt server/test and sbt sharedJVM/test

Pritam Kadam
  • 2,388
  • 8
  • 16
  • thanks - this works - only downside is that clean does not clean the modules `client` and `sharedJS` – pme Feb 12 '19 at 20:05