Fix patch versin for scala when overriding
To remain compatible with silencer, chop off the patch to not break downstream builds
This commit is contained in:
parent
94dc84d5d0
commit
207b89224f
1 changed files with 21 additions and 11 deletions
|
|
@ -35,17 +35,27 @@ object Dependencies {
|
||||||
val scalaTestVersion = "3.1.1"
|
val scalaTestVersion = "3.1.1"
|
||||||
val scalaCheckVersion = "1.14.3"
|
val scalaCheckVersion = "1.14.3"
|
||||||
|
|
||||||
val Versions = Seq(
|
val Versions =
|
||||||
crossScalaVersions := Seq(scala212Version, scala213Version),
|
Seq(
|
||||||
scalaVersion := System.getProperty("akka.build.scalaVersion", crossScalaVersions.value.head),
|
crossScalaVersions := Seq(scala212Version, scala213Version),
|
||||||
java8CompatVersion := {
|
scalaVersion := {
|
||||||
CrossVersion.partialVersion(scalaVersion.value) match {
|
// don't allow full override to keep compatible with the version of silencer
|
||||||
// java8-compat is only used in a couple of places for 2.13,
|
// don't mandate patch not specified to allow builds to migrate
|
||||||
// it is probably possible to remove the dependency if needed.
|
System.getProperty("akka.build.scalaVersion", "default") match {
|
||||||
case Some((2, n)) if n >= 13 => "0.9.0"
|
case twoThirteen if twoThirteen.startsWith("2.13") => scala213Version
|
||||||
case _ => "0.8.0"
|
case twoTwelve if twoTwelve.startsWith("2.12") => scala212Version
|
||||||
}
|
case "default" => crossScalaVersions.value.head
|
||||||
})
|
case other => throw new IllegalArgumentException(s"Unsupported scala version [$other]. Must be 2.12 or 2.13.")
|
||||||
|
}
|
||||||
|
},
|
||||||
|
java8CompatVersion := {
|
||||||
|
CrossVersion.partialVersion(scalaVersion.value) match {
|
||||||
|
// java8-compat is only used in a couple of places for 2.13,
|
||||||
|
// it is probably possible to remove the dependency if needed.
|
||||||
|
case Some((2, n)) if n >= 13 => "0.9.0"
|
||||||
|
case _ => "0.8.0"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
object Compile {
|
object Compile {
|
||||||
// Compile
|
// Compile
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue