Skip to content

Commit

Permalink
Added support for typelevel scala libraries
Browse files Browse the repository at this point in the history
  • Loading branch information
lefou committed Feb 14, 2019
1 parent d0ae597 commit cb98118
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions scalalib/api/src/ZincWorkerApi.scala
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,15 @@ object Util{
private val ReleaseVersion = raw"""(\d+)\.(\d+)\.(\d+)""".r
private val MinorSnapshotVersion = raw"""(\d+)\.(\d+)\.([1-9]\d*)-SNAPSHOT""".r
private val DottyVersion = raw"""0\.(\d+)\.(\d+).*""".r
private val TypelevelVersion = raw"""(\d+)\.(\d+)\.(\d+)-bin-typelevel.*""".r


def scalaBinaryVersion(scalaVersion: String) = {
scalaVersion match {
case ReleaseVersion(major, minor, _) => s"$major.$minor"
case MinorSnapshotVersion(major, minor, _) => s"$major.$minor"
case DottyVersion(minor, _) => s"0.$minor"
case TypelevelVersion(major, minor, _) => s"$major.$minor"
case _ => scalaVersion
}
}
Expand Down

0 comments on commit cb98118

Please sign in to comment.