Skip to content

Commit

Permalink
Update Build for Scala 2.13
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristopherDavenport committed Feb 20, 2019
1 parent 7917641 commit 3918c54
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 5 deletions.
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ sudo: false
language: scala

scala:
- 2.13.0-M5
- 2.12.8
- 2.11.12

Expand All @@ -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
Expand Down
24 changes: 21 additions & 3 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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(
Expand All @@ -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
)
)

Expand Down

0 comments on commit 3918c54

Please sign in to comment.