SBT Test-Dependencies in Multiprojects: Make the Test-Code Available to Dependent Projects

前端 未结 2 675
忘了有多久
忘了有多久 2020-12-07 13:03

I\'ve a SBT multi-project where some projects have dependencies to each other. Like this:

 lazy val coreProject: Project = Project(
    id = \"core-project\"         


        
相关标签:
2条回答
  • 2020-12-07 13:46

    You can also do this with a .dependsOn(coreProject % "compile->compile;test->test") after the initial project declaration.

    lazy val coreProject = Project("core-project")
    lazy val extensions = Project("extensions").dependsOn(coreProject % "compile->compile;test->test")
    
    0 讨论(0)
  • 2020-12-07 13:52

    Like so:

    dependencies = Seq(coreProject % "compile->compile;test->test")
    

    This is discussed in the section "Per-configuration classpath dependencies" in then Getting-Started-Multi-Project guide.

    0 讨论(0)
提交回复
热议问题