Skip to content

Commit 6c13209

Browse files
smarteradpi2
authored andcommitted
sbt-dotty: the binary version is 3 for Scala >= 3.0.0
1 parent 85a03ee commit 6c13209

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

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

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -269,11 +269,10 @@ object DottyPlugin extends AutoPlugin {
269269
scalaBinaryVersion := {
270270
scalaVersion.value.split("[\\.-]").toList match {
271271
case "0" :: minor :: _ => s"0.$minor"
272-
case "3" :: minor :: patch :: suffix =>
273-
s"3.$minor.$patch" + (suffix match {
274-
case milestone :: _ => s"-$milestone"
275-
case Nil => ""
276-
})
272+
case "3" :: "0" :: "0" :: milestone :: _ =>
273+
s"3.0.0-$milestone"
274+
case "3" :: _ =>
275+
"3"
277276
case _ => scalaBinaryVersion.value
278277
}
279278
},

0 commit comments

Comments
 (0)