In SBT it is possible to depend directly on another project. This has the advantage that when running ~compile, a change to the dependency causes a rebuild.
Now I want to depend on a subproject of another project, without depending on any of its siblings. So, for example, I have:
a/
build.sbt
b/
build.sbt
c/
build.sbt
d/
build.sbt
and I want d to depend on b but not on c.
I tried, in d/build.sbt,
lazy val d = ProjectRef(file("../a"), "b")
lazy val root = project.dependsOn(d)
but this gives
Note: Unresolved dependencies path:
com.foo:a_2.10:1.0
+- root:root_2.10:1.0
I could of course do
lazy val d = RootProject(file("../a/b"))
except that it is possible for a/build.sbt to contain additional settings for a/b that won't be pickup up this way. I need a reference that will pick up a/build.sbt but also refer specifically to a/b.
Is there any way to make this sort of reference?