Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

scala

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.

like image 608
0__ Avatar asked Jun 27 '15 16:06

0__


1 Answers

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/
like image 107
0__ Avatar answered Nov 09 '22 23:11

0__