From 3918c54cc9d978a1e38f7d30f45a6ddef6ca3a30 Mon Sep 17 00:00:00 2001 From: Christopher Davenport Date: Tue, 19 Feb 2019 21:53:20 -0500 Subject: [PATCH] Update Build for Scala 2.13 --- .travis.yml | 5 +++-- build.sbt | 24 +++++++++++++++++++++--- 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 888191b..bd33e26 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,6 +2,7 @@ sudo: false language: scala scala: + - 2.13.0-M5 - 2.12.8 - 2.11.12 @@ -21,8 +22,8 @@ install: script: - sbt ++$TRAVIS_SCALA_VERSION test - - sbt ++$TRAVIS_SCALA_VERSION mimaReportBinaryIssues - - sbt ++$TRAVIS_SCALA_VERSION docs/makeMicrosite + - test $TRAVIS_SCALA_VERSION == "2.13.0-M5" || sbt ++$TRAVIS_SCALA_VERSION mimaReportBinaryIssues + - test $TRAVIS_SCALA_VERSION == "2.13.0-M5" || sbt ++$TRAVIS_SCALA_VERSION docs/makeMicrosite after_success: - test $TRAVIS_PULL_REQUEST == "false" && test $TRAVIS_BRANCH == "master" && test $TRAVIS_REPO_SLUG == "ChristopherDavenport/circuit" && sbt ++$TRAVIS_SCALA_VERSION publish diff --git a/build.sbt b/build.sbt index 5434737..b9dd34a 100644 --- a/build.sbt +++ b/build.sbt @@ -2,7 +2,7 @@ import sbtcrossproject.CrossPlugin.autoImport.{crossProject, CrossType} lazy val `circuit` = project.in(file(".")) .settings(commonSettings, releaseSettings, skipOnPublishSettings) - .aggregate(core, docs) + .aggregate(core) lazy val core = project.in(file("core")) .settings(commonSettings, releaseSettings, mimaSettings) @@ -26,12 +26,30 @@ val catsEffectV = "1.2.0" val kindProjectorV = "0.9.9" val betterMonadicForV = "0.3.0-M4" +val scalaTestV = Def.setting{ + CrossVersion.partialVersion(scalaVersion.value) match { + case Some((2, v)) if v <= 12 => + "3.0.5" + case _ => + "3.0.6-SNAP5" + } +} + +val scalaCheckV = Def.setting{ + CrossVersion.partialVersion(scalaVersion.value) match { + case Some((2, v)) if v <= 12 => + "1.13.5" + case _ => + "1.14.0" + } +} + // General Settings lazy val commonSettings = Seq( organization := "io.chrisdavenport", scalaVersion := "2.12.8", - crossScalaVersions := Seq(scalaVersion.value, "2.11.12"), + crossScalaVersions := Seq("2.13.0-M5", scalaVersion.value, "2.11.12"), scalacOptions += "-Yrangepos", scalacOptions in (Compile, doc) ++= Seq( @@ -45,7 +63,7 @@ lazy val commonSettings = Seq( libraryDependencies ++= Seq( "org.typelevel" %% "cats-core" % catsV, "org.typelevel" %% "cats-effect" % catsEffectV, - "org.scalatest" %% "scalatest" % "3.0.5" % Test + "org.scalatest" %% "scalatest" % scalaTestV.value % Test ) )