I have sbt project, commonLib
which builds fine as a standalone project. What I want to do now, is to make this project a git-submodule of other project and add it as additional module. The resulting layout should look like following:
+ project
+ src
+ commonLib
+---- project
+---- src
How can I correctly add such sbt project as a module of root project? Is this even possible? Putting all modules in one repository is not an option for me, since this commonLib is also used by other projects, and we want to make collaborative development of this module as smooth as possible.
P.S. Using repository for releases on every commit in commonLib does not feels like a good solution, and we can't stuck to at least something like releases of common library because development is very active.
Thanks to the documentation link from lpiepiora, I ended up doing it like this in my Build.scala for root project:
lazy val commonLib = ProjectRef(file("commonLib"), "commonLib")
lazy val root = Project("myProject", file(".")).dependsOn(commonLib)
, where commonLib is a name of project mentioned in Build.scala of commonLib sbt project.
If you only need root project of subdirectory with standalone sbt project just use RootProject instead of ProjectRef.