Skip to content

Commit 4575a6d

Browse files
committed
add Scala 3 to crossbuild
fixes #200
1 parent 3375e8e commit 4575a6d

File tree

3 files changed

+16
-6
lines changed

3 files changed

+16
-6
lines changed

.travis.yml

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import: scala/scala-dev:travis/default.yml
55
language: scala
66

77
scala:
8+
- 3.0.0-RC1
89
- 2.11.12
910
- 2.12.13
1011
- 2.13.5

build.sbt

+14-6
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ lazy val commonSettings = Seq(
4848
lazy val fnGen = (project in file("fnGen"))
4949
.settings(commonSettings)
5050
.settings(
51+
crossScalaVersions := Seq("2.12.13"),
5152
run / fork := true, // Needed if you run this project directly
5253
libraryDependencies += "org.scala-lang" % "scala-reflect" % scalaVersion.value,
5354
libraryDependencies += "org.scala-lang" % "scala-compiler" % scalaVersion.value
@@ -73,10 +74,11 @@ lazy val scalaJava8Compat = (project in file("."))
7374

7475
libraryDependencies += "com.novocode" % "junit-interface" % "0.11" % "test",
7576

76-
// we're still in 0.x land so we could choose to break bincompat,
77-
// but let's at least be aware when we're doing it. also we should
78-
// think about going 1.0, it's been a while
79-
scalaModuleMimaPreviousVersion := Some("0.9.1"),
77+
scalaModuleMimaPreviousVersion := {
78+
// pending resolution of https://github.com/scalacenter/sbt-version-policy/issues/62
79+
if (isDotty.value) None
80+
else Some("0.9.1")
81+
},
8082

8183
mimaBinaryIssueFilters ++= {
8284
import com.typesafe.tools.mima.core._, ProblemFilters._
@@ -146,8 +148,14 @@ lazy val scalaJava8Compat = (project in file("."))
146148
},
147149
JavaDoc / javacOptions := Seq("-Xdoclint:none"),
148150
JavaDoc / packageDoc / artifactName := ((sv, mod, art) => "" + mod.name + "_" + sv.binary + "-" + mod.revision + "-javadoc.jar"),
149-
libraryDependencies += compilerPlugin("com.typesafe.genjavadoc" % "genjavadoc-plugin" % "0.16" cross CrossVersion.full),
150-
Compile / scalacOptions += "-P:genjavadoc:out=" + (target.value / "java")
151+
libraryDependencies ++= (
152+
if (isDotty.value) Seq()
153+
else Seq(compilerPlugin("com.typesafe.genjavadoc" % "genjavadoc-plugin" % "0.16" cross CrossVersion.full))
154+
),
155+
Compile / scalacOptions ++= (
156+
if (isDotty.value) Seq()
157+
else Seq(s"""-P:genjavadoc:out=${target.value / "java"}""")
158+
),
151159
)
152160
}
153161
)

project/plugins.sbt

+1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
addSbtPlugin("org.scala-lang.modules" % "sbt-scala-module" % "2.2.4")
22
addSbtPlugin("ch.epfl.scala" % "sbt-version-policy" % "1.0.0-RC5")
3+
addSbtPlugin("ch.epfl.lamp" % "sbt-dotty" % "0.5.3")

0 commit comments

Comments
 (0)