Skip to content

Commit f5459d0

Browse files
committed
Bump version to 0.18.1
And use this version as an indicator of 2.13 support, to allow sbt-dotty to work with nightly builds of 0.18 from both before and after the switch to 2.13.
1 parent 00d2bf0 commit f5459d0

File tree

2 files changed

+18
-3
lines changed

2 files changed

+18
-3
lines changed

project/Build.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ object MyScalaJSPlugin extends AutoPlugin {
6060
object Build {
6161
val referenceVersion = "0.17.0-RC1"
6262

63-
val baseVersion = "0.18.0"
63+
val baseVersion = "0.18.1"
6464
val baseSbtDottyVersion = "0.3.4"
6565

6666
// Versions used by the vscode extension to create a new project

sbt-dotty/src/dotty/tools/sbtplugin/DottyPlugin.scala

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,23 @@ object DottyPlugin extends AutoPlugin {
9393
val name = moduleID.name
9494
if (name != "dotty" && name != "dotty-library" && name != "dotty-compiler")
9595
moduleID.crossVersion match {
96-
case _: librarymanagement.Binary if scalaVersion.startsWith("0.") =>
97-
moduleID.cross(CrossVersion.constant("2.13"))
96+
case _: librarymanagement.Binary =>
97+
val compatVersion =
98+
CrossVersion.partialVersion(scalaVersion) match {
99+
case Some((3, _)) =>
100+
"2.13"
101+
case Some((0, minor)) =>
102+
if (minor > 18 || scalaVersion.startsWith("0.18.1"))
103+
"2.13"
104+
else
105+
"2.12"
106+
case _ =>
107+
""
108+
}
109+
if (compatVersion.nonEmpty)
110+
moduleID.cross(CrossVersion.constant(compatVersion))
111+
else
112+
moduleID
98113
case _ =>
99114
moduleID
100115
}

0 commit comments

Comments
 (0)