pick up different source file for different Scala version
问题 Hi I would like to know if using SBT is possible to cross compiling against different Scala version using different sources for some classes. To keep back compatibility basically but leverage also on the new language features. Thanks. 回答1: You can add additional source directories based on scala version by adding to the unmanagedSourceDirectories setting. Something like this: unmanagedSourceDirectories in Compile <+= (scalaVersion, sourceDirectory in Compile) { case (v, dir) if v startsWith