From 249c06a54bfec74bbfd88069297bb1e87e663bdd Mon Sep 17 00:00:00 2001 From: Seth Tisue Date: Wed, 15 Mar 2017 14:38:24 -0700 Subject: [PATCH 1/4] misc little updates to the build definition --- build.sbt | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/build.sbt b/build.sbt index f28d26b..a3fa042 100644 --- a/build.sbt +++ b/build.sbt @@ -6,7 +6,7 @@ organization := "com.typesafe" version := "1.1.0" -lazy val scala210Version = "2.10.5" +lazy val scala210Version = "2.10.6" lazy val scala211Version = "2.11.8" lazy val scala212Version = "2.12.1" @@ -22,17 +22,20 @@ publishTo := Some(typesafeIvyReleases) publishMavenStyle := false -scalacOptions <<= (scalaVersion) map { sv => - Seq("-unchecked", "-deprecation") ++ - { if (sv.startsWith("2.9")) Seq.empty else Seq("-feature") } -} +scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature") -javacOptions in (Compile, doc) := Seq("-target", "1.6", "-source", "1.6") +javacOptions in (Compile, doc) ++= + (CrossVersion.partialVersion(scalaVersion.value) match { + case Some ((2, n)) if n <= 11 => + Seq("-target", "1.6", "-source", "1.6") + case _ => + Seq() + }) licenses += ("Apache-2.0", url("https://www.apache.org/licenses/LICENSE-2.0.html")) libraryDependencies ++= Seq( - "org.scalatest" %% "scalatest" % "3.0.0" % Test + "org.scalatest" %% "scalatest" % "3.0.1" % Test ) initialCommands in console := { From 0449704a5dd0094e6944df2496560fe633d98d90 Mon Sep 17 00:00:00 2001 From: Seth Tisue Date: Wed, 15 Mar 2017 14:39:38 -0700 Subject: [PATCH 2/4] add a Travis build --- .travis.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..df27b5e --- /dev/null +++ b/.travis.yml @@ -0,0 +1,14 @@ +sudo: false +cache: + directories: + - $HOME/.ivy2 + - $HOME/.sbt/boot + - $HOME/.sbt/launchers + - $HOME/.coursier +jdk: oraclejdk8 +language: scala +script: + - sbt test package +before_cache: + - find $HOME/.sbt -name "*.lock" | xargs rm + - find $HOME/.ivy2 -name "ivydata-*.properties" | xargs rm From 0fbb9a9648e31744c19b2f867373ac1761ccf4de Mon Sep 17 00:00:00 2001 From: Seth Tisue Date: Wed, 15 Mar 2017 14:42:01 -0700 Subject: [PATCH 3/4] remove javacOptions from build there are no Java sources in this project perhaps whoever added this meant scalacOptions, and was trying to ensure that the library worked on Java 6? I think it is fine to require Java 8 now, in 2017. --- build.sbt | 8 -------- 1 file changed, 8 deletions(-) diff --git a/build.sbt b/build.sbt index a3fa042..ecc2053 100644 --- a/build.sbt +++ b/build.sbt @@ -24,14 +24,6 @@ publishMavenStyle := false scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature") -javacOptions in (Compile, doc) ++= - (CrossVersion.partialVersion(scalaVersion.value) match { - case Some ((2, n)) if n <= 11 => - Seq("-target", "1.6", "-source", "1.6") - case _ => - Seq() - }) - licenses += ("Apache-2.0", url("https://www.apache.org/licenses/LICENSE-2.0.html")) libraryDependencies ++= Seq( From 3e50d6665393d99c15605411f153c54de8a626a7 Mon Sep 17 00:00:00 2001 From: Seth Tisue Date: Wed, 15 Mar 2017 14:54:52 -0700 Subject: [PATCH 4/4] we need -Xfatal-warnings, definitely practice what we preach --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index ecc2053..0f43676 100644 --- a/build.sbt +++ b/build.sbt @@ -22,7 +22,7 @@ publishTo := Some(typesafeIvyReleases) publishMavenStyle := false -scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature") +scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature", "-Xfatal-warnings") licenses += ("Apache-2.0", url("https://www.apache.org/licenses/LICENSE-2.0.html"))