SBT: How to determine subproject dependencies in subproject build.sbt files?

The following build.sbt file works, but it defines the dependencies of all subprojects:

name := "myproject" version := "1.0" scalaVersion := "2.11.8" libraryDependencies ++= Seq( "org.scalafx" %% "scalafx" % "8.0.60-R9" ) lazy val aLib = (project in file("lib/a")) lazy val bLib = (project in file("lib/b")) .dependsOn(aLib) .dependsOn(cLib) lazy val cLib = (project in file("lib/c")) .dependsOn(aLib) lazy val myApp = (project in file("myapp")) .dependsOn(aLib) .dependsOn(bLib) .dependsOn(cLib) .aggregate(aLib, bLib, cLib) 

Since each subproject (lib / a, lib / b, lib / c, myapp directories) has its own build.sbt file, I would like to use these assembly files to determine the individual dependencies of each project.

I tried to move the dependsOn / aggregate statements to subproject assembly files, but I cannot get them to work this way. What is the recommended way?

+2
scala build sbt subproject
source share

No one has answered this question yet.

See similar questions:

4
Unable to use sbt 0.13.7 with Play subprojects

or similar:

75
How to manage multiple interdependent modules with SBT and IntelliJ IDEA?
34
Idiomatic way of writing multi-project collections with .sbt files in sbt 0.13
4
Blurred loading of management dependencies on SBT project
3
Final sbt setup subproject
3
Embed a game application as a subproject in sbt
one
Simple SBT module in Play Project crashes the game in an unknown case - game 2.1
one
how to connect to cassandra via scala in the game structure
0
Trying to use Play 2.5.3, but SBT freezes when resolving dependencies
0
build.sbt ProjectRef: not enough arguments for the method
0
should play 2 xx applications have build.sbt and build.scala

All Articles