diff --git a/.sbtrepos b/.sbtrepos new file mode 100644 index 00000000..b9e49c48 --- /dev/null +++ b/.sbtrepos @@ -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 diff --git a/.travis.yml b/.travis.yml index be6031a8..befc37fa 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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+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+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 @@ -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: diff --git a/README.md b/README.md index 9ee44c09..9813e5b9 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/admin/README.md b/admin/README.md index 3e9d1bfa..d5df76e4 100644 --- a/admin/README.md +++ b/admin/README.md @@ -28,7 +28,7 @@ jdk: scala: - 2.11.12 - - 2.12.6 + - 2.12.8 env: global: diff --git a/build.sbt b/build.sbt index 261adae6..100a457f 100644 --- a/build.sbt +++ b/build.sbt @@ -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", @@ -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 @@ -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")) @@ -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 @@ -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 diff --git a/project/LatestScala213.scala b/project/LatestScala213.scala deleted file mode 100644 index 79727898..00000000 --- a/project/LatestScala213.scala +++ /dev/null @@ -1,44 +0,0 @@ -import org.jsoup.Jsoup -import com.github.nscala_time.time.Imports._ - -import java.nio.file._ -import java.net.URL - -// Fetch the latest Scala 2.13 by scraping the artifactory web directory -// We just search the latest version by date -// run the command: latest-213 in sbt -// NB. maven-metadata.xml does not point to the latest version -object LatestScala { - - def printLatestScala213(): Unit = { - val url = - "https://scala-ci.typesafe.com/artifactory/scala-integration/org/scala-lang/scala-library/" - val index = new URL(url).openStream() - val html = scala.io.Source.fromInputStream(index).mkString - index.close - - val doc = Jsoup.parse(html, url) - val pre = doc.select("pre").get(1).text - val versionsAndDateRaw = pre.split("\n").drop(1).dropRight(1) - val dateFormat = DateTimeFormat.forPattern("dd-MMM-yyyy HH:mm") - val versionsAndDate = - versionsAndDateRaw.map { line => - val Array(version, dateRaw) = line.split("/") - val dateClean = dateRaw.dropRight(1).trim - val date = DateTime.parse(dateClean, dateFormat) - (version, date) - } - - def Descending[T: Ordering] = implicitly[Ordering[T]].reverse - - val (version, date) = versionsAndDate.sortBy(_._2)(Descending).head - val latestVersion = version - val lastestDate = dateFormat.print(date) - - println() - println(latestVersion) - println() - println(lastestDate) - println() - } -} diff --git a/project/MultiScalaProject.scala b/project/MultiScalaProject.scala index ccccd7f6..f0170a63 100644 --- a/project/MultiScalaProject.scala +++ b/project/MultiScalaProject.scala @@ -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(...)) * // ... * }}} */ diff --git a/project/build.properties b/project/build.properties index 133a8f19..8e682c52 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=0.13.17 +sbt.version=0.13.18 diff --git a/project/plugins.sbt b/project/plugins.sbt index 83390fdf..904c83b4 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -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")