I have a multi-project sbt build with one project that has a dependy on another project. In my ide I want to be able to re-factor the code in the dependency and it affect the code in the dependant project (so I use dependsOn) but in jenkins I want that dependant project to have a jar dependency and to build as standalone.
So in my ide I want to use dependsOn but in jenkins I want use libraryDependecies, but I'm struggling to get the sbt file to build correctly using somthing like:
lazy val projB = Try(project in file("../projB")).toOption
lazy val projA = project in file(".")
projB match {
case Some(p) => projA dependsOn p
case None => libraryDependencies += "org.mine" % "proj.b" % scalaVersion.value
}
I was thinking about using a Build.scala but it seems that approach is deprecated see
I'd like to hear some ideas on how to achieve this