Assembly dependency as part of multi-module sbt build
Asked Answered
I

0

6

I have a multi module sbt project, e.g.:

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 an assembly jar out of my core project, and then make the app module dependant on this assembly.

In case it were two different projects, I would just define a dependency of the sort:

"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 a way to achieve this using sbt?

Ilan answered 2/6, 2016 at 15:9 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.