Skip to content

Commit f178854

Browse files
authored
Merge pull request #267 from lightbend/updates/scala-2.13.5
2 parents e563ae9 + 6878c1e commit f178854

File tree

2 files changed

+24
-25
lines changed

2 files changed

+24
-25
lines changed

.travis.yml

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
language: scala
22

33
env:
4+
#
5+
# Scala 2.11 supported versions
6+
#
47
- SCALA_VERSION=2.11.6
58
TRAVIS_JDK=adopt@~1.8.0-0
69
- SCALA_VERSION=2.11.7
@@ -14,6 +17,9 @@ env:
1417
TRAVIS_JDK=adopt@~1.8.0-0
1518
- SCALA_VERSION=2.11.12
1619
TRAVIS_JDK=adopt@~1.11.0-0
20+
#
21+
# Scala 2.12 supported versions
22+
#
1723
- SCALA_VERSION=2.12.3
1824
TRAVIS_JDK=adopt@~1.8.0-0
1925
- SCALA_VERSION=2.12.3
@@ -54,6 +60,9 @@ env:
5460
TRAVIS_JDK=adopt@~1.8.0-0
5561
- SCALA_VERSION=2.12.13
5662
TRAVIS_JDK=adopt@~1.11.0-0
63+
#
64+
# Scala 2.13 supported versions
65+
#
5766
- SCALA_VERSION=2.13.0
5867
TRAVIS_JDK=adopt@~1.8.0-0
5968
- SCALA_VERSION=2.13.0
@@ -74,6 +83,10 @@ env:
7483
TRAVIS_JDK=adopt@~1.8.0-0
7584
- SCALA_VERSION=2.13.4
7685
TRAVIS_JDK=adopt@~1.11.0-0
86+
- SCALA_VERSION=2.13.5
87+
TRAVIS_JDK=adopt@~1.8.0-0
88+
- SCALA_VERSION=2.13.5
89+
TRAVIS_JDK=adopt@~1.11.0-0
7790

7891
before_install: curl -Ls https://git.io/jabba | bash && . ~/.jabba/jabba.sh
7992
install: jabba install "$TRAVIS_JDK" && jabba use "$_" && java -Xmx32m -version
@@ -98,7 +111,7 @@ before_cache:
98111
- find $HOME/.ivy2 -name "ivydata-*.properties" | xargs rm
99112
cache:
100113
directories:
101-
- $HOME/.ivy2
102-
- $HOME/.sbt/boot
103-
- $HOME/.sbt/launchers
104-
- $HOME/.cache/coursier
114+
- $HOME/.ivy2
115+
- $HOME/.sbt/boot
116+
- $HOME/.sbt/launchers
117+
- $HOME/.cache/coursier

build.sbt

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -46,20 +46,13 @@ lazy val defaults = Seq(
4646
sonatypeProfileName := "com.typesafe",
4747
scalaVersion := crossScalaVersions.value.last,
4848
crossScalaVersions := {
49-
val earliest211 = 6
50-
val latest211 = 12
51-
val latest212 = 13
52-
val latest213 = 4
53-
val skipVersions = Set("2.11.9", "2.11.10")
54-
val scala211Versions =
55-
(earliest211 to latest211)
56-
.map(i => s"2.11.$i")
57-
.filterNot(skipVersions.contains(_))
58-
ifJavaVersion(_ < 8) {
59-
scala211Versions
60-
} {
61-
scala211Versions ++ (0 to latest212).map(i => s"2.12.$i") ++ (0 to latest213).map(i => s"2.13.$i")
62-
}
49+
// Remember to keep this list aligned with .travis.yml
50+
// 2.11.6 is the first to be supported and we skip 2.11.9 and 2.11.10
51+
val supportedScala211Versions = Seq("2.11.6", "2.11.7", "2.11.8", "2.11.11", "2.11.12")
52+
// Scala 2.12.[0-2] are not supported
53+
val supportedScala212Versions = (3 to 13).map(p => s"2.12.$p")
54+
val supportedScala213Versions = (0 to 5).map(p => s"2.13.$p")
55+
supportedScala211Versions ++ supportedScala212Versions ++ supportedScala213Versions
6356
},
6457
scalaMajorVersion := CrossVersion.partialVersion(scalaVersion.value).get._2.toInt,
6558
resolvers += Resolver.mavenLocal,
@@ -74,10 +67,3 @@ lazy val defaults = Seq(
7467
)
7568

7669
lazy val browse = SettingKey[Boolean]("browse", "run with -Ybrowse:uncurry")
77-
78-
def ifJavaVersion[T](predicate: Int => Boolean)(yes: => T)(no: => T): T = {
79-
System.getProperty("java.version").split("\\.").toList match {
80-
case "1" :: v :: _ if predicate(v.toInt) => yes
81-
case _ => no
82-
}
83-
}

0 commit comments

Comments
 (0)