1
1
val scalaVersions = Seq (" 2.13.15" , " 3.3.4" )
2
+ val defaultScalaVersion = scalaVersions.head
3
+
4
+ // When defining JVM / Scala Native matrix we don't want duplicated projects for Scala 2/3
5
+ val matrixScalaVersions = Seq (defaultScalaVersion)
6
+
2
7
ThisBuild / crossScalaVersions := scalaVersions
3
- ThisBuild / scalaVersion := ( ThisBuild / crossScalaVersions).value.head
8
+ ThisBuild / scalaVersion := defaultScalaVersion
4
9
5
10
Global / concurrentRestrictions += Tags .limit(NativeTags .Link , 1 )
6
11
Global / cancelable := true
@@ -10,6 +15,7 @@ lazy val commonSettings: Seq[Setting[_]] =
10
15
Seq (scalaModuleAutomaticModuleName := Some (" scala.collection.parallel" )) ++
11
16
ScalaModulePlugin .scalaModuleSettings ++ Seq (
12
17
versionPolicyIntention := Compatibility .BinaryAndSourceCompatible ,
18
+ crossScalaVersions := scalaVersions,
13
19
Compile / compile / scalacOptions --= (CrossVersion .partialVersion(scalaVersion.value) match {
14
20
case Some ((3 , _)) => Seq (" -Xlint" )
15
21
case _ => Seq ()
@@ -31,9 +37,9 @@ lazy val core = projectMatrix.in(file("core"))
31
37
name := " scala-parallel-collections" ,
32
38
Compile / doc / autoAPIMappings := true ,
33
39
)
34
- .jvmPlatform(scalaVersions )
35
- .nativePlatform(scalaVersions , settings = testNativeSettings ++ Seq (
36
- versionPolicyPreviousArtifacts := Nil , // TODO: not yet published ,
40
+ .jvmPlatform(matrixScalaVersions )
41
+ .nativePlatform(matrixScalaVersions , settings = testNativeSettings ++ Seq (
42
+ versionPolicyPreviousArtifacts := Nil , // TODO: not yet published
37
43
mimaPreviousArtifacts := Set .empty
38
44
))
39
45
@@ -43,7 +49,7 @@ lazy val junit = projectMatrix.in(file("junit"))
43
49
testOptions += Tests .Argument (TestFrameworks .JUnit , " -a" , " -v" ),
44
50
publish / skip := true ,
45
51
).dependsOn(testmacros, core)
46
- .jvmPlatform(scalaVersions ,
52
+ .jvmPlatform(matrixScalaVersions ,
47
53
settings = Seq (
48
54
libraryDependencies += " com.github.sbt" % " junit-interface" % " 0.13.3" % Test ,
49
55
libraryDependencies += " junit" % " junit" % " 4.13.2" % Test ,
@@ -52,18 +58,18 @@ lazy val junit = projectMatrix.in(file("junit"))
52
58
Test / fork := true ,
53
59
)
54
60
)
55
- .nativePlatform(scalaVersions = scalaVersions ,
61
+ .nativePlatform(matrixScalaVersions ,
56
62
axisValues = Nil ,
57
63
configure = _
58
64
.enablePlugins(ScalaNativeJUnitPlugin )
59
65
.settings(
60
- Test / unmanagedSources/ excludeFilter ~= { _ ||
61
- " SerializationTest.scala" || // requires ObjectOutputStream
62
- " SerializationStability.scala" || // requires jaxb-api
63
- " SerializationStabilityBase.scala" ||
64
- " SerializationStabilityTest.scala"
65
- },
66
- Test / fork := false
66
+ Test / unmanagedSources/ excludeFilter ~= { _ ||
67
+ " SerializationTest.scala" || // requires ObjectOutputStream
68
+ " SerializationStability.scala" || // requires jaxb-api
69
+ " SerializationStabilityBase.scala" ||
70
+ " SerializationStabilityTest.scala"
71
+ },
72
+ Test / fork := false
67
73
)
68
74
)
69
75
@@ -73,13 +79,14 @@ lazy val scalacheck = projectMatrix.in(file("scalacheck"))
73
79
libraryDependencies += " org.scalacheck" %%% " scalacheck" % " 1.18.1" ,
74
80
Test / testOptions += Tests .Argument (TestFrameworks .ScalaCheck , " -workers" , " 1" , " -minSize" , " 0" , " -maxSize" , " 4000" , " -minSuccessfulTests" , " 5" ),
75
81
publish / skip := true
76
- ).dependsOn(core)
77
- .jvmPlatform(scalaVersions,
78
- settings = Seq (
79
- Test / fork := true
80
- )
82
+ )
83
+ .dependsOn(core)
84
+ .jvmPlatform(matrixScalaVersions,
85
+ settings = Seq (
86
+ Test / fork := true
81
87
)
82
- .nativePlatform(scalaVersions, settings = testNativeSettings)
88
+ )
89
+ .nativePlatform(matrixScalaVersions, settings = testNativeSettings)
83
90
84
91
lazy val testmacros = projectMatrix.in(file(" testmacros" ))
85
92
.settings(commonSettings)
@@ -90,8 +97,8 @@ lazy val testmacros = projectMatrix.in(file("testmacros"))
90
97
}),
91
98
publish / skip := true ,
92
99
)
93
- .jvmPlatform(scalaVersions )
94
- .nativePlatform(scalaVersions , settings = testNativeSettings)
100
+ .jvmPlatform(matrixScalaVersions )
101
+ .nativePlatform(matrixScalaVersions , settings = testNativeSettings)
95
102
96
103
commands += Command .single(" setScalaVersion" ) { (state, arg) =>
97
104
val command = arg match {
0 commit comments