From 14a68b71d7912a846df4455f05dfc291f82791e4 Mon Sep 17 00:00:00 2001 From: xuwei-k <6b656e6a69@gmail.com> Date: Sun, 17 Jun 2018 00:07:47 +0900 Subject: [PATCH] enable Scala 2.13.0-M4 test --- .travis.yml | 6 ++++-- build.sbt | 3 +-- project/Dependencies.scala | 7 ++++++- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index c96d25cf..0e7bfd73 100644 --- a/.travis.yml +++ b/.travis.yml @@ -47,14 +47,16 @@ matrix: osx_image: xcode9.3 - scala: 2.13.0-M4 - env: CMD=compile + env: + CMD="scalafmt::test test:scalafmt::test sbt:scalafmt::test test" + TRAVIS_SCALA_VERSION=2.13.0-M4 os: linux dist: trusty - scala: 2.13.0-M4 os: osx env: - CMD="compile" + CMD="scalafmt::test test:scalafmt::test sbt:scalafmt::test test" TRAVIS_SCALA_VERSION=2.13.0-M4 language: java osx_image: xcode9.3 diff --git a/build.sbt b/build.sbt index 0a54e19a..11d52d05 100644 --- a/build.sbt +++ b/build.sbt @@ -31,8 +31,7 @@ val io = (project in file("io")) commonSettings, name := "IO", libraryDependencies ++= { - if (scalaVersion.value startsWith "2.13.") Vector() - else Vector(scalaCompiler.value % Test, scalaCheck % Test, scalatest % Test) + Vector(scalaCompiler.value % Test, scalaCheck % Test, scalatest.value % Test) } ++ Vector(appleFileEvents), libraryDependencies ++= Seq(jna, jnaPlatform), sourceManaged in (Compile, generateContrabands) := baseDirectory.value / "src" / "main" / "contraband-scala", diff --git a/project/Dependencies.scala b/project/Dependencies.scala index 57a70a2b..14f11297 100644 --- a/project/Dependencies.scala +++ b/project/Dependencies.scala @@ -10,7 +10,12 @@ object Dependencies { val scalaCompiler = Def.setting { "org.scala-lang" % "scala-compiler" % scalaVersion.value } val scalaCheck = "org.scalacheck" %% "scalacheck" % "1.14.0" - val scalatest = "org.scalatest" %% "scalatest" % "3.0.5-M1" + val scalatest = Def.setting { + if (scalaVersion.value == "2.13.0-M4") + "org.scalatest" %% "scalatest" % "3.0.6-SNAP1" + else + "org.scalatest" %% "scalatest" % "3.0.5-M1" + } val jna = "net.java.dev.jna" % "jna" % "4.5.0" val jnaPlatform = "net.java.dev.jna" % "jna-platform" % "4.5.0" val appleFileEvents = "com.swoval" % "apple-file-events" % "1.3.2"