0__
0__

Reputation: 67280

What are the Scala version-specific source directories in sbt?

I am almost sure I read/saw somewhere that latest sbt versions allow me to place Scala-version specific sources in particular directories so they would be picked up depending on scalaVersion automatically, without having to fiddle around with unmanagedSourceDirectories and creating a source filtering setting. Like

src/main/scala/worksInAllVersions.scala
src/main/scala_211???/myTraitForScala211.scala
src/main/scala_210???/myTraitForScala210.scala

Is this so? The docs don't mention anything.

Upvotes: 13

Views: 896

Answers (1)

0__
0__

Reputation: 67280

This seems to have been added in this pull request into sbt 0.13.8. The directories must be named

src/main/scala-2.10/
src/main/scala-2.11/

Upvotes: 11

Related Questions