How to reference external sbt project from another sbt project?

前端 未结 3 922
温柔的废话
温柔的废话 2020-12-02 13:04

I have the following setup of a Scala application and a common core library: root

 -> /ApplicationA
   -> /project
     -> /build.sbt
 -> /CoreLi         


        
3条回答
  •  孤街浪徒
    2020-12-02 13:47

    Since sbt 0.13, you may create multi-project definitions directly in .sbt without needing a Build.scala file.

    So adding the following to ApplicationA/project/build.sbt would be sufficient.

    lazy val core = RootProject(file("../CoreLibrary"))
    
    val main = Project(id = "application", base = file(".")).dependsOn(core) 
    

提交回复
热议问题