Skip to content

fix JDK 6 on CI, and bump Scala and sbt and versions #172

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .sbtrepos
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[repositories]
local
local-preloaded-ivy: file:///${sbt.preloaded-${sbt.global.base-${user.home}/.sbt}/preloaded/}, [organization]/[module]/[revision]/[type]s/[artifact](-[classifier]).[ext]
local-preloaded: file:///${sbt.preloaded-${sbt.global.base-${user.home}/.sbt}/preloaded/}
maven-central: http://repo1.maven.org/maven2/
sonatype-public: http://oss.sonatype.org/content/repositories/public
typesafe-ivy-releases: http://repo.typesafe.com/typesafe/ivy-releases/, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext], bootOnly
sbt-ivy-releases: http://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext], bootOnly
55 changes: 29 additions & 26 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,21 @@
# slower instance startup, but needed to work around https://github.com/travis-ci/travis-ci/issues/9713
sudo: true
# Needed for openjdk6
dist: precise
addons:
hosts:
- localhost
hostname: localhost.local

language: scala

addons:
apt:
packages:
- openjdk-6-jdk
scala:
- 2.11.12
- 2.12.6
- 2.12.8
- 2.13.0-M5
jdk:
- openjdk6
- oraclejdk8
env:
global:
# force jdk 8 for sbt due to sonatype droping support for jdk6 on https (TLS 1.0)
# https://stackoverflow.com/questions/50824789/why-am-i-getting-received-fatal-alert-protocol-version-or-peer-not-authentic/50824799#50824799
- JAVA_HOME: /usr/lib/jvm/java-8-oracle

# PGP_PASSPHRASE
- secure: "rjetmX9HXoN/scxTCBFCHIUDFryY0Yd29sR6EBrW/2tCOILO09RTCcJB0kPn2YMZ9en8ChTtOpqGF9133f6wZ7/ZINSUt1tNwnbgDlhGbwJW2WFTUEmL7ScdqmgRGa294aVuAfrvJnr+dN92it6ibAB8nThgsjq0LnZREJsKwQ77vvEeATEKutuPLGlrHrmqL7/XCjb2uYz9Xh0sSpyQlKOGt5EN7JzM/Bzyju+RYS9BvnLVV86fey/UWO1DNDa4MU5835akevqvtwN7CpCFxFKgbfc+40bAh7Xc59UnkxP+Lcs2KxJx9heS6RJJiNEx99r59LL2JALyN++yOAS97HEfii4Yc3OK9VRZCNQFW4gNm3VtGNW4EC+LOX/9cUiUNg2J65nY0UF2d6R3vsqiCKaK6C0cm+jIs3fgDHFlB+MiHC/ZECaoPvwzm1AxQMIWyoFFqXuHQk3Ef137G0x1ejneUoGD/PqMbiEAX64+VVvOxgOI2/jyt4hFTEk6JiWVahmk+7oFAsLH1n9J1Y3csMvmo9S0S/Ey9D3bR07hggc8pj/CJPj9gFSfpGEVhroc37T/VlP23EVJgpteovERyeJGC3P7wVWvi1pNNW6iOVENzY1GkHlHkJUI7Q4B+eIW2mh5wi6JyC/DM2lO4z3M2KQkNqQgzIBdm5p/4hezkkA="
Expand All @@ -28,14 +25,14 @@ env:
- secure: "m0Fw/eH7RXJJoBTfqV6CMd7kaIN2pRPnQPNXJGb546UjqYAlYTkfjvVrWpsgpisRBptI1FEHn24yGbgAHjIes/4un/O62K66I0BffL8PbdeHeNcDjSrTesKEqage2mQfGOiqccVsmkgiKeXNYL8tPZRmPQQ3XZ97mS1SXWlqAJSMW6HfNnvqW14Gdb/snR6I8lQ2o5tRnLerWPnI96pp+xjZca2lD4XDvH2wLJXXLmYY61e23ZYzZMepxBxhGa7js3YTYzCWNrOfBLjFJ5nwRxbjR0WMuz5z5Gdy715WtguKS4Fffd/GJHycLROBU9LCAQDMTxMFvqzFqVFpfq0BuTmmkXFXj+a7dO+ABG0RfoDfoMjn7pHwyHNCZyMMuR1HCjMkbGFwC+Zme2UAYNivtcsuWWeMuypwjyqjfFfNns4FHJ0SXFtC/6+OJkAuUdbEJKReYWKWEsP5SnCH/8PLlc+uUl3tjQkFLc1sOAyx9cTWyBErwuJXhgTrjT9AWvO+fvhcm8z/p5+aaF/U9GIrzPqziX4hGjzc/WC+rsFJSiBDlFQl7br+m8WWs7/wuXqPGXmhf0BNQViDi7fZndDHcY3p3T0An05d/IMKjCUrgLDlJi6VYs9XN7S8ay6MH+XTwIsJGSxtGjfEO4rHGIjtR2GRr8TqdNfnpsI3ucbia1Y="
matrix:
- SCALAJS_VERSION=
- SCALAJS_VERSION=0.6.25
- SCALAJS_VERSION=1.0.0-M3
- SCALAJS_VERSION=0.6.26
- SCALAJS_VERSION=1.0.0-M6

matrix:
exclude:
# > 2.12 requires jdk8
- jdk: openjdk6
scala: 2.12.6
scala: 2.12.8

- jdk: openjdk6
scala: 2.13.0-M5
Expand All @@ -44,44 +41,50 @@ matrix:
- jdk: oraclejdk8
scala: 2.11.12

# 2.13.0-M5 is not available in Scala.js 1.0.0-M3
# 2.13.0-M5 is not available in Scala.js 1.0.0-M6
- scala: 2.13.0-M5
env: SCALAJS_VERSION=1.0.0-M3
env: SCALAJS_VERSION=1.0.0-M6
include:

# run migration test
- jdk: oraclejdk8
scala: 2.12.6
scala: 2.12.8
env: TEST_SCALAFIX=true

# run binary compatibility test
- jdk: oraclejdk8
scala: 2.12.6
scala: 2.12.8
env: TEST_BINARY_COMPAT=true

# run scalafmt
- jdk: oraclejdk8
scala: 2.12.6
scala: 2.12.8
env: TEST_SCALAFMT=true

# | jdk | scala | scala target | scala target version | scalafix test |
# | ----------- | --------- | ------------ | -------------------- |---------------|
# | openjdk6 | 2.11.12 | jvm | | |
# | openjdk6 | 2.11.12 | js | 0.6.23 | |
# | openjdk6 | 2.11.12 | js | 1.0.0-M3 | |
# | oraclejdk8 | 2.12.6 | jvm | | |
# | oraclejdk8 | 2.12.6 | js | 0.6.23 | |
# | oraclejdk8 | 2.12.6 | js | 1.0.0-M3 | |
# | openjdk6 | 2.11.12 | js | 0.6.26 | |
# | openjdk6 | 2.11.12 | js | 1.0.0-M6 | |
# | oraclejdk8 | 2.12.8 | jvm | | |
# | oraclejdk8 | 2.12.8 | js | 0.6.26 | |
# | oraclejdk8 | 2.12.8 | js | 1.0.0-M6 | |
# | oraclejdk8 | 2.13.0-M5 | jvm | | |
# | oraclejdk8 | 2.13.0-M5 | js | 0.6.23 | |
# | oraclejdk8 | 2.12.6 | jvm | | true |
# | oraclejdk8 | 2.13.0-M5 | js | 0.6.26 | |
# | oraclejdk8 | 2.12.8 | jvm | | true |

before_script:
- nvm install 8
- nvm use 8
- admin/checkCLA.sh

script:
# work around https://github.com/travis-ci/travis-ci/issues/9713
- if [[ $JAVA_HOME = *java-6* ]]; then jdk_switcher use openjdk6; fi
- java -version
- sbt ci
- node -v
- if [[ "$TRAVIS_JDK_VERSION" == "openjdk6" ]]; then SBTOPTS="-Dsbt.override.build.repos=true -Dsbt.repository.config=./.sbtrepos"; fi
- sbt $SBTOPTS ci

cache:
directories:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ The library also adds backported versions of new collection types, currently `sc

## Migration Tool

The migration rules use scalafix. Please see the [official installation instruction](https://scalacenter.github.io/scalafix/docs/users/installation.html) and, in particular, check that your full Scala version is supported (ex 2.12.6).
The migration rules use scalafix. Please see the [official installation instruction](https://scalacenter.github.io/scalafix/docs/users/installation.html) and, in particular, check that your full Scala version is supported (ex 2.12.8).

```scala
// project/plugins.sbt
Expand Down
2 changes: 1 addition & 1 deletion admin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jdk:

scala:
- 2.11.12
- 2.12.6
- 2.12.8

env:
global:
Expand Down
23 changes: 4 additions & 19 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,9 @@ lazy val root = project

lazy val junit = libraryDependencies += "com.novocode" % "junit-interface" % "0.11" % Test

lazy val scala211 = "2.11.12"
lazy val scala212 = "2.12.6"
lazy val scalaJs213 = "2.13.0-M5" // Scala.js does no have -pre

lazy val scala211 = "2.11.12"
lazy val scala212 = "2.12.8"
lazy val scala213 = "2.13.0-M5"
// lazy val scala213 = "2.13.0-pre-3ae6282" // use the sbt command `latest-213` to fetch the latest version

lazy val scala213Settings = Seq(
resolvers += "scala-pr" at "https://scala-ci.typesafe.com/artifactory/scala-integration/",
scalaVersion := scala213
)

lazy val compat = MultiScalaCrossProject(JSPlatform, JVMPlatform)(
"compat",
Expand Down Expand Up @@ -93,7 +85,7 @@ lazy val compat = MultiScalaCrossProject(JSPlatform, JVMPlatform)(

val compat211 = compat(scala211)
val compat212 = compat(scala212)
val compat213 = compat(scala213, scalaJs213, _.jvmSettings(scala213Settings))
val compat213 = compat(scala213)

lazy val compat211JVM = compat211.jvm
lazy val compat211JS = compat211.js
Expand Down Expand Up @@ -166,8 +158,7 @@ lazy val `scalafix-data` = MultiScalaProject(

val `scalafix-data211` = `scalafix-data`(scala211, _.dependsOn(compat211JVM))
val `scalafix-data212` = `scalafix-data`(scalafixScala212, _.dependsOn(compat212JVM))
val `scalafix-data213` =
`scalafix-data`(scala213, _.settings(scala213Settings).dependsOn(compat213JVM))
val `scalafix-data213` = `scalafix-data`(scala213, _.dependsOn(compat213JVM))

lazy val `scalafix-input` = project
.in(file("scalafix/input"))
Expand Down Expand Up @@ -220,14 +211,12 @@ lazy val `scalafix-output213` = `scalafix-output`(
scala213,
_.settings(addOutput213)
.settings(addOutput212Plus)
.settings(scala213Settings)
.dependsOn(`scalafix-data213`)
)

lazy val `scalafix-output213-failure` = project
.in(file("scalafix/output213-failure"))
.settings(sharedScalafixSettings)
.settings(scala213Settings)
.settings(dontPublish)

lazy val `scalafix-tests` = project
Expand Down Expand Up @@ -286,10 +275,6 @@ inThisBuild(releaseCredentials)
inThisBuild(
Seq(
crossScalaVersions := Seq(scala211, scala212, scala213),
commands += Command.command("latest-213") { state =>
LatestScala.printLatestScala213()
state
},
commands += Command.command(preRelease) { state =>
// Show Compat version, Scala version, and Java Version
val jvmVersion = Version.parse(sys.props("java.specification.version")).get.minor
Expand Down
44 changes: 0 additions & 44 deletions project/LatestScala213.scala

This file was deleted.

2 changes: 1 addition & 1 deletion project/MultiScalaProject.scala
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import java.io.File
*
* // instanciate a sbt project
* lazy val myProject211 = myProject("2.11.12", _.settings(...) /* scala version dependent configurations */)
* lazy val myProject212 = myProject("2.12.6" , _.settings(...))
* lazy val myProject212 = myProject("2.12.8" , _.settings(...))
* // ...
* }}}
*/
Expand Down
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=0.13.17
sbt.version=0.13.18
2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ else
// see https://github.com/scala/sbt-scala-module/issues/35
Seq(addSbtPlugin("com.typesafe.sbt" % "sbt-osgi" % "0.9.3"))

val scalaJSVersion = Option(System.getenv("SCALAJS_VERSION")).filter(_.nonEmpty).getOrElse("0.6.25")
val scalaJSVersion = Option(System.getenv("SCALAJS_VERSION")).filter(_.nonEmpty).getOrElse("0.6.26")

addSbtPlugin("org.scala-js" % "sbt-scalajs" % scalaJSVersion)
addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "0.6.0")
Expand Down