How do I add one SBT project to a dependency on another?

I have the following project setup:

Base/
  build.sbt
  src/

Main/
  build.sbt
  src/

      

Where Base

and Main

- two projects. I would like to Main

have classes Base

on the classpath Main

. If possible, I would like to keep the assemblies separate. How can i do this?

Thank!

+3


source to share


1 answer


You can try Multi-Project build, it might be best in your case: http://www.scala-sbt.org/0.13.5/docs/Getting-Started/Multi-Project.html

However, if the two projects are completely separate, sbt maintains the original dependencies, it definitely works from github and I think it should work with file dependencies too



lazy val Main = Project("Main", file("."), settings = ...) dependsOn(baseDep)

lazy val baseDep = uri("file:///path/to/base/project")

      

+2


source







All Articles