mirror of https://github.com/sbt/sbt.git
Merge pull request #1573 from cunei/wip-scala-bin-compat
Allow the "-bin" Scala version suffix to specify a bincompat version
This commit is contained in:
commit
b43d358e0e
|
|
@ -39,9 +39,11 @@ object CrossVersionUtil
|
|||
private[${{cross.package0}}] def scalaApiVersion(v: String): Option[(Int, Int)] =
|
||||
{
|
||||
val ReleaseV = """(\d+)\.(\d+)\.(\d+)(-\d+)?""".r
|
||||
val BinCompatV = """(\d+)\.(\d+)\.(\d+)-bin(-.*)?""".r
|
||||
val NonReleaseV = """(\d+)\.(\d+)\.(\d+)(-\w+)""".r
|
||||
v match {
|
||||
case ReleaseV(x, y, z, ht) => Some((x.toInt, y.toInt))
|
||||
case BinCompatV(x, y, z, ht) => Some((x.toInt, y.toInt))
|
||||
case NonReleaseV(x, y, z, ht) if z.toInt > 0 => Some((x.toInt, y.toInt))
|
||||
case _ => None
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue