I'm using an OTHER_HOME
environment variable to point to a different SBT project directory. I'm going to put the external directory in maven repository or via a github.com#tag project reference, but for now I'd like to add a file-based dependency to a Play project.
I've got this working in Build.scala
style:
val otherProjectDir = Option(System.getenv("OTHER_HOME"))
.getOrElse("Set environment OTHER_HOME to your 'other' git clone")
// take the core sublibrary from other project
val otherCore = ProjectRef(file(otherProjectDir), "core")
val main = play.Project(appName, appVersion, appDependencies)
.dependsOn(otherCore)
I'd like to switch to build.sbt
, but I have no clue how to do this. Please advise.