From a7c6237d7e6c58d798d98a295f9c9a92c5656f63 Mon Sep 17 00:00:00 2001 From: "Kai(luo) Wang" Date: Tue, 9 May 2017 21:00:46 -0400 Subject: [PATCH] upgraded to scala 2.12.2 and 2.11.11 and scalaJs (#1632) * upgraded to scala 2.12.2 and 2.11.11 * upgrade scalajs * turn off xlint:unused in scala 2.12 * Update build.sbt * Update plugins.sbt --- .travis.yml | 4 ++-- build.sbt | 15 ++++++++++++--- project/plugins.sbt | 2 +- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index a932b8e4be..d908c4f71e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,14 +9,14 @@ git: scala: - 2.10.6 - - 2.11.8 + - 2.11.11 jdk: - oraclejdk7 matrix: include: - - scala: 2.12.1 + - scala: 2.12.2 jdk: oraclejdk8 before_install: diff --git a/build.sbt b/build.sbt index fe5c68015e..4ac1d1eb74 100644 --- a/build.sbt +++ b/build.sbt @@ -25,7 +25,7 @@ lazy val kernelSettings = Seq( Resolver.sonatypeRepo("snapshots")), parallelExecution in Test := false, scalacOptions in (Compile, doc) := (scalacOptions in (Compile, doc)).value.filter(_ != "-Xfatal-warnings") -) ++ warnUnusedImport ++ update2_12 +) ++ warnUnusedImport ++ update2_12 ++ xlint lazy val commonSettings = Seq( incOptions := incOptions.value.withLogRecompileOnMacro(false), @@ -48,7 +48,8 @@ lazy val commonSettings = Seq( scalastyleSources in Compile ++= (unmanagedSourceDirectories in Compile).value, ivyConfigurations += config("compile-time").hide, unmanagedClasspath in Compile ++= update.value.select(configurationFilter("compile-time")) -) ++ warnUnusedImport ++ update2_12 +) ++ warnUnusedImport ++ update2_12 ++ xlint + lazy val tagName = Def.setting{ s"v${if (releaseUseGlobalVersion.value) (version in ThisBuild).value else version.value}" @@ -472,7 +473,6 @@ lazy val commonScalacOptions = Seq( "-language:experimental.macros", "-unchecked", "-Xfatal-warnings", - "-Xlint", "-Yno-adapted-args", "-Ywarn-dead-code", "-Ywarn-numeric-widen", @@ -573,3 +573,12 @@ lazy val update2_12 = Seq( } } ) + +lazy val xlint = Seq( + scalacOptions += { + CrossVersion.partialVersion(scalaVersion.value) match { + case Some((2, 12)) => "-Xlint:-unused,_" + case _ => "-Xlint" + } + } +) diff --git a/project/plugins.sbt b/project/plugins.sbt index 35d86e7288..3feed6358f 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -7,7 +7,7 @@ addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.2.16") addSbtPlugin("org.scalastyle" % "scalastyle-sbt-plugin" % "0.8.0") addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.5.0") addSbtPlugin("com.typesafe.sbt" % "sbt-git" % "0.8.5") -addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.14") +addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.16") addSbtPlugin("com.github.tkawachi" % "sbt-doctest" % "0.4.1") addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "1.1") addSbtPlugin("com.fortysevendeg" % "sbt-microsites" % "0.3.2")