I have a multi-module assembly build of SBT against Scala 2.10, 2.11 and 2.12. I would like to add a submodule to support Java 8. However, this is only possible for Scala 2.11 (and 2.12). My goal is for the SBT to build this particular submodule only for 2.11 and 2.12 and ignore it for 2.10; in particular, do not publish the artifact for 2.10.
My current working hypothesis is to redefine the keys publish, libraryDependenciesand unmanagedSourceDirectoriesbased on the Scala version, but I was looking for a more elegant solution.
source
share