Skip to content

Commit

Permalink
upgraded to scala 2.12.2 and 2.11.11 and scalaJs (#1632)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
kailuowang authored May 10, 2017
1 parent 2db95a7 commit a7c6237
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
15 changes: 12 additions & 3 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand All @@ -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}"
Expand Down Expand Up @@ -472,7 +473,6 @@ lazy val commonScalacOptions = Seq(
"-language:experimental.macros",
"-unchecked",
"-Xfatal-warnings",
"-Xlint",
"-Yno-adapted-args",
"-Ywarn-dead-code",
"-Ywarn-numeric-widen",
Expand Down Expand Up @@ -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"
}
}
)
2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit a7c6237

Please sign in to comment.