You can add to unmanagedSourceDirectories:
lazy val commonSettings = Seq(
scalaVersion := "2.10.4",
unmanagedSourceDirectories in Compile +=
(sourceDirectory in Compile).value / ("scala_" + (scalaBinaryVersion.value match {
case v if v startsWith "2.9." => "2.9"
case v => v
}))
)
lazy val root = (project in file(".")).
aggregate(app).
settings(commonSettings: _*)
lazy val app = (project in file("app")).
settings(commonSettings: _*)
Now it src/main/scala_2.10is part of the source directory for Scala 2.10.x and src/main/scala_2.9for Scala 2.9.x.
Update
Now the port request opened by @indrajitr Enable cross-version support for Scala sources. # 1799
source
share