Build dependency as part of sbt multi-module build

I have a project with several sbt modules, for example:

lazy val core = (project in file("my-project-core"))
.settings(name := "my-project-core")
// more settings

lazy val app = (project in file("my-project-app"))
.settings(name := "my-project-app")
// more settings
.dependsOn(core)

Now I would like to build a jar assembly from my main project, and then make the application module dependent on that assembly.

If these were two different projects, I would simply define a sort dependency:

"group.id" % "my-project-core" % "1.0" intransitive() classifier "assembly"

So, in terms of pseudo-code, I would like to write something like this:

.dependsOn(core classifier "assembly")

Is there any way to achieve this with sbt?

+4
source share

All Articles