SBT Scala cross versions, with aggregation and dependencies
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am struggling with how crossScalaVersions works with subprojects. I have a project that compiles with 2.10 (foo) and a project that compiles with 2.11 (bar). They share a cross compiled project (common). How can I compile projects foo and bar? build.sbt lazy val root = (project in file(".")).aggregate(foo, bar).settings( crossScalaVersions := Seq("2.10.4", "2.11.4") ) lazy val foo = (project in file("foo")).dependsOn(common).settings( crossScalaVersions := Seq("2.10.4"), scalaVersion := "2.10.4" ) lazy val bar = (project in file("bar"))