I understand that cross-building across different Scala versions is easy with SBT. You just put your files which fail to compile in scala-2.10
and scala-2.11
directories instead of scala
. However, If I want to cross build for different versions of Scala and for different versions of a dependency (say, Spark 1.6 and 2.1) then how can that be done?
Asked
Active
Viewed 610 times
3

aa8y
- 3,854
- 4
- 37
- 62
-
Look at this thread: http://stackoverflow.com/questions/13982853/sbt-cross-building-choosing-a-different-library-version-for-different-scala-ve?rq=1 – Thilo Mar 26 '17 at 01:11
-
1I did. But it just talks about using different versions of libraries for different versions of Scala. I want to build both the versions of Scala with both the versions of Spark. – aa8y Mar 26 '17 at 01:31
-
Oh, I see. So you want four different output artefacts. Thanks for the clarification. – Thilo Mar 26 '17 at 01:36
-
1You can't use two versions of a direct dependency (here Spark) in the same project. So you should have two different projects or two Git branches, one with each version of Spark. – L. CWI Mar 27 '17 at 09:55