1- ThisBuild / scalaVersion := " 2.13.7"
1+ ThisBuild / scalaVersion := " 3.1.0"
2+ ThisBuild / crossScalaVersions := Seq ((ThisBuild / scalaVersion).value, " 2.13.7" )
23
34lazy val root = project.in(file(" ." ))
45 .aggregate(collectionContrib.jvm, collectionContrib.js)
@@ -17,8 +18,18 @@ lazy val collectionContrib = crossProject(JVMPlatform, JSPlatform)
1718 name := " scala-collection-contrib" ,
1819 versionPolicyIntention := Compatibility .BinaryCompatible ,
1920 scalaModuleAutomaticModuleName := Some (" scala.collection.contrib" ),
20- Compile / compile / scalacOptions ++= Seq (" -opt-warnings" , " -language:higherKinds" , " -deprecation" , " -feature" , " -Xfatal-warnings" , " -Wconf:origin=scala.collection.IterableOps.toIterable:s" ),
21- Compile / doc / scalacOptions ++= Seq (" -implicits" , " -groups" , " -nowarn" ),
21+ Compile / compile / scalacOptions ++= {
22+ CrossVersion .partialVersion(scalaVersion.value) match {
23+ case Some ((2 , _)) => Seq (" -opt-warnings" , " -Werror" , " -Wconf:origin=scala.collection.IterableOps.toIterable:s" )
24+ case Some ((3 , _)) => Seq (" -Xfatal-warnings" )
25+ }
26+ },
27+ Compile / doc / scalacOptions ++= {
28+ CrossVersion .partialVersion(scalaVersion.value) match {
29+ case Some ((2 , _)) => Seq (" -implicits" , " -groups" , " -nowarn" )
30+ case Some ((3 , _)) => Seq .empty
31+ }
32+ },
2233 testOptions += Tests .Argument (TestFrameworks .JUnit , " -q" , " -v" , " -s" , " -a" ),
2334 Test / parallelExecution := false , // why?
2435 libraryDependencies ++= Seq (
0 commit comments