2

I have an sbt build with multi-project. Let call them a,b,c that have some dependency between each other

I would like to publish a single root artifact that contain a,b,c instead of having 3 different artifacts.

I did set the individual build.sbt publishArtifact to false but I do not know how to ask root to publish the big merged artifact.

lazy val a = project
lazy val b = project.dependsOn(a)
lazy val c = project.dependsOn(b)
Atol
  • 569
  • 4
  • 12
  • Same question: https://stackoverflow.com/questions/37377703/include-sub-module-artifacts-in-sbt-multi-project-build – danielnixon Apr 03 '17 at 01:10

1 Answers1

0

Not necessarily what you want, but maybe:

lazy val c = project.settings(
  unmanagedSourceDirectories in Compile ++= (unmanagedSourceDirectories in (b,Compile)).value
  libraryDependencies ++= (libraryDependencies in b).value
)

And apply transitively to the other projects :)

I think using sbt-assembly might be a more standard choice.

Justin Kaeser
  • 5,868
  • 27
  • 46