@@ -6,21 +6,25 @@ ThisBuild / versionPolicyIntention := Compatibility.BinaryAndSourceCompatible
66
77lazy  val  commonSettings :  Seq [Setting [_]] = 
88  ScalaModulePlugin .scalaModuleSettings ++  Seq (
9-     Compile  /  compile /  scalacOptions --=  (if  (isDotty.value) Seq (" -Xlint" 
10-                                            else  Seq ()),
11-     Compile  /  compile /  scalacOptions ++=  (if  (isDotty.value) Seq ()
12-                                            else  Seq (" -Werror" 
9+     Compile  /  compile /  scalacOptions --=  (CrossVersion .partialVersion(scalaVersion.value) match  {
10+       case  Some ((3 , _)) =>  Seq (" -Xlint" 
11+       case  _            =>  Seq ()
12+     }),
13+     Compile  /  compile /  scalacOptions ++=  (CrossVersion .partialVersion(scalaVersion.value) match  {
14+       case  Some ((3 , _)) =>  Seq ()
15+       case  _            =>  Seq (" -Werror" 
16+     }),
1317  )
1418
1519lazy  val  core  =  project.in(file(" core" 
1620  .settings(commonSettings)
1721  .settings(
1822    name :=  " scala-parallel-collections" 
19-     //  don't run Dottydoc, it errors and isn't needed anyway.
20-     //  but we leave `publishArtifact` set to true, otherwise Sonatype won't let us publish
21-     Compile  /  doc /  sources :=  (if  (isDotty.value) Seq () else  (Compile  /  doc/  sources).value),
2223    Compile  /  doc /  autoAPIMappings :=  true ,
23-     scalaModuleMimaPreviousVersion :=  Some (" 1.0.0" =>  isDotty.value),
24+     scalaModuleMimaPreviousVersion :=  (CrossVersion .partialVersion(scalaVersion.value) match  {
25+       case  Some ((3 , _)) =>  None 
26+       case  _            =>  Some (" 1.0.0" 
27+     }),
2428  )
2529
2630lazy  val  junit  =  project.in(file(" junit" 
@@ -47,11 +51,9 @@ lazy val scalacheck = project.in(file("scalacheck"))
4751lazy  val  testmacros  =  project.in(file(" testmacros" 
4852  .settings(commonSettings)
4953  .settings(
50-     libraryDependencies +=  (
51-       if  (isDotty.value)
52-         scalaOrganization.value %%  " scala3-compiler" %  scalaVersion.value
53-       else 
54-         scalaOrganization.value %  " scala-compiler" %  scalaVersion.value
55-     ),
54+     libraryDependencies +=  (CrossVersion .partialVersion(scalaVersion.value) match  {
55+       case  Some ((3 , _)) =>  scalaOrganization.value %%  " scala3-compiler" %  scalaVersion.value
56+       case  _            =>  scalaOrganization.value %  " scala-compiler" %  scalaVersion.value
57+     }),
5658    publish /  skip :=  true ,
5759  )
0 commit comments