1+ import sbt .CrossVersion
2+
13sourceDirectory := file(" dummy source directory" )
24
35scalaVersionSettings
@@ -11,7 +13,9 @@ lazy val travisCommit = Option(System.getenv().get("TRAVIS_COMMIT"))
1113
1214lazy val scalaVersionSettings = Seq (
1315 scalaVersion := " 2.12.3" ,
14- crossScalaVersions := Seq (" 2.10.6" , " 2.11.11" , " 2.13.0-M3" , scalaVersion.value)
16+ // Temporary: we will eventually use 2.13.0-M4, which will be published to maven central
17+ resolvers += " scala-pr" at " https://scala-ci.typesafe.com/artifactory/scala-integration/" ,
18+ crossScalaVersions := Seq (" 2.10.6" , " 2.11.11" , " 2.13.0-pre-c577876" , scalaVersion.value)
1519)
1620
1721lazy val sharedSettings = MimaSettings .settings ++ scalaVersionSettings ++ Seq (
@@ -46,6 +50,17 @@ lazy val sharedSettings = MimaSettings.settings ++ scalaVersionSettings ++ Seq(
4650
4751 unmanagedSourceDirectories in Test += (baseDirectory in LocalRootProject ).value / " src" / " test" / " scala" ,
4852
53+ unmanagedSourceDirectories in Compile ++= {
54+ (unmanagedSourceDirectories in Compile ).value.map { dir =>
55+ CrossVersion .partialVersion(scalaVersion.value) match {
56+ case Some ((2 , 13 )) => file(dir.getPath ++ " -2.13" )
57+ case _ => file(dir.getPath ++ " -2.10-2.12" )
58+ }
59+ }
60+ },
61+
62+ libraryDependencies += " org.scala-lang" %% " scala-collection-compat" % " 0.1-SNAPSHOT" ,
63+
4964 resolvers += " sonatype" at " https://oss.sonatype.org/content/repositories/releases" ,
5065
5166 javacOptions += " -Xmx1024M" ,
@@ -55,7 +70,7 @@ lazy val sharedSettings = MimaSettings.settings ++ scalaVersionSettings ++ Seq(
5570 " -encoding" , " UTF-8" ,
5671 " -feature" ,
5772 " -unchecked" ,
58- " -Xfatal-warnings" ,
73+ // "-Xfatal-warnings", Disabled because “import scala.collection.compat._” causes “Unused import” warnings on 2.13.
5974 " -Xfuture" ,
6075 " -Yno-adapted-args" ,
6176 " -Ywarn-dead-code" ,
0 commit comments