1
1
Global / cancelable := true
2
2
publish / skip := true // in root
3
3
4
+ Global / scalacOptions ++= (
5
+ if (isDotty.value) Seq (" -language:implicitConversions" ) // TODO check again on 3.0.0-M1
6
+ else Seq ()
7
+ )
8
+
4
9
lazy val commonSettings : Seq [Setting [_]] =
5
10
ScalaModulePlugin .scalaModuleSettings ++ Seq (
6
- Compile / compile / scalacOptions += " -Werror"
11
+ Compile / compile / scalacOptions --= (if (isDotty.value) Seq (" -Xlint" )
12
+ else Seq ()),
13
+ Compile / compile / scalacOptions ++= (if (isDotty.value) Seq ()
14
+ else Seq (" -Werror" )),
7
15
)
8
16
9
17
lazy val core = project.in(file(" core" ))
10
18
.settings(commonSettings)
11
19
.settings(
12
- name := " scala-parallel-collections"
20
+ name := " scala-parallel-collections" ,
21
+ // don't run Dottydoc, it errors and isn't needed anyway
22
+ Compile / doc / sources := (if (isDotty.value) Seq () else (Compile / doc/ sources).value),
23
+ Compile / packageDoc / publishArtifact := ! isDotty.value,
13
24
)
14
25
15
26
lazy val junit = project.in(file(" junit" ))
@@ -20,13 +31,22 @@ lazy val junit = project.in(file("junit"))
20
31
libraryDependencies += " javax.xml.bind" % " jaxb-api" % " 2.3.1" % Test ,
21
32
testOptions += Tests .Argument (TestFrameworks .JUnit , " -a" , " -v" ),
22
33
Test / fork := true ,
23
- publish / skip := true
34
+ publish / skip := true ,
35
+ // https://github.com/sbt/sbt/pull/5919 adds this to sbt itself,
36
+ // so we should revisit once sbt 1.4.1 is available
37
+ Test / unmanagedSourceDirectories += {
38
+ val major = CrossVersion .partialVersion(scalaVersion.value) match {
39
+ case Some ((0 | 3 , _)) => " 3"
40
+ case _ => " 2"
41
+ }
42
+ baseDirectory.value / " src" / " test" / s " scala- $major"
43
+ },
24
44
).dependsOn(testmacros, core)
25
45
26
46
lazy val scalacheck = project.in(file(" scalacheck" ))
27
47
.settings(commonSettings)
28
48
.settings(
29
- libraryDependencies += " org.scalacheck" %% " scalacheck" % " 1.14.3 " ,
49
+ libraryDependencies += " org.scalacheck" %% " scalacheck" % " 1.15.0-M1 " withDottyCompat(scalaVersion.value) ,
30
50
Test / fork := true ,
31
51
Test / testOptions += Tests .Argument (TestFrameworks .ScalaCheck , " -workers" , " 1" , " -minSize" , " 0" , " -maxSize" , " 4000" , " -minSuccessfulTests" , " 5" ),
32
52
publish / skip := true
@@ -36,5 +56,14 @@ lazy val testmacros = project.in(file("testmacros"))
36
56
.settings(commonSettings)
37
57
.settings(
38
58
libraryDependencies += scalaOrganization.value % " scala-compiler" % scalaVersion.value,
39
- publish / skip := true
59
+ publish / skip := true ,
60
+ // https://github.com/sbt/sbt/pull/5919 adds this to sbt itself,
61
+ // so we should revisit once sbt 1.4.1 is available
62
+ Compile / unmanagedSourceDirectories += {
63
+ val major = CrossVersion .partialVersion(scalaVersion.value) match {
64
+ case Some ((0 | 3 , _)) => " 3"
65
+ case _ => " 2"
66
+ }
67
+ baseDirectory.value / " src" / " main" / s " scala- $major"
68
+ },
40
69
)
0 commit comments