@@ -6,21 +6,25 @@ ThisBuild / versionPolicyIntention := Compatibility.BinaryAndSourceCompatible
6
6
7
7
lazy val commonSettings : Seq [Setting [_]] =
8
8
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
+ }),
13
17
)
14
18
15
19
lazy val core = project.in(file(" core" ))
16
20
.settings(commonSettings)
17
21
.settings(
18
22
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),
22
23
Compile / doc / autoAPIMappings := true ,
23
- scalaModuleMimaPreviousVersion := Some (" 1.0.0" ).filterNot(_ => isDotty.value),
24
+ scalaModuleMimaPreviousVersion := (CrossVersion .partialVersion(scalaVersion.value) match {
25
+ case Some ((3 , _)) => None
26
+ case _ => Some (" 1.0.0" )
27
+ }),
24
28
)
25
29
26
30
lazy val junit = project.in(file(" junit" ))
@@ -47,11 +51,9 @@ lazy val scalacheck = project.in(file("scalacheck"))
47
51
lazy val testmacros = project.in(file(" testmacros" ))
48
52
.settings(commonSettings)
49
53
.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
+ }),
56
58
publish / skip := true ,
57
59
)
0 commit comments