SBT: How to define dependencies of subprojects in subprojects' 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 (directories lib/a, lib/b, lib/c, myapp) has its own