Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade with 2.13 CI #43

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ scala:
- 2.11.12
- 2.12.8
- 2.13.0-M5
- 2.13.0

jdk:
- oraclejdk8
- oraclejdk9
- oraclejdk11

script: sbt ++$TRAVIS_SCALA_VERSION test doc mimaReportBinaryIssues

Expand Down
24 changes: 17 additions & 7 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ mimaPreviousArtifacts := {
versions.filter(versionFilter).map("io.circe" %% "circe-config" % _)
}

unmanagedSourceDirectories in Compile += {
val sourceDir = (sourceDirectory in Compile).value
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, n)) if n <= 12 => sourceDir / "scala-2.13-"
case _ => sourceDir / "scala-2.13+"
}
}

enablePlugins(GitPlugin)
versionWithGit
git.useGitDescribe := true
Expand Down Expand Up @@ -44,12 +52,13 @@ releaseProcess := {
}

val Versions = new {
val catsEffect = "1.3.0"
val circe = "0.11.1"
val catsEffect = "2.0.0-M4"
val circe = "0.12.0-M3"
val config = "1.3.3"
val discipline = "0.11.0"
val discipline = "0.12.0-M3"
val scalaCheck = "1.14.0"
val scalaTest = "3.0.5"
val scalaTest = "3.1.0-SNAP13"
val scalaTestPlus = "1.0.0-SNAP8"
}

libraryDependencies ++= Seq(
Expand All @@ -59,9 +68,10 @@ libraryDependencies ++= Seq(
"io.circe" %% "circe-generic" % Versions.circe % Test,
"io.circe" %% "circe-testing" % Versions.circe % Test,
"org.typelevel" %% "cats-effect" % Versions.catsEffect % Test,
"org.typelevel" %% "discipline" % Versions.discipline % Test,
"org.typelevel" %% "discipline-core" % Versions.discipline % Test,
"org.scalacheck" %% "scalacheck" % Versions.scalaCheck % Test,
"org.scalatest" %% "scalatest" % Versions.scalaTest % Test
"org.scalatest" %% "scalatest" % Versions.scalaTest % Test,
"org.scalatestplus" %% "scalatestplus-scalacheck" % Versions.scalaTestPlus % Test
)

enablePlugins(GhpagesPlugin, SiteScaladocPlugin)
Expand All @@ -84,7 +94,6 @@ scalacOptions ++= Seq(
"-language:postfixOps",
"-language:higherKinds",
"-unchecked",
"-Xfuture",
"-Ywarn-dead-code",
"-Ywarn-numeric-widen",
)
Expand All @@ -95,6 +104,7 @@ scalacOptions ++= {
Seq(
"-Xfatal-warnings",
"-Yno-adapted-args",
"-Xfuture",
)
case _ =>
Nil
Expand Down
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.2.8
sbt.version=1.3.0-RC2
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package io.circe.config

// Probably not needed after https://github.com/scala/scala-collection-compat/pull/217
package object compat {
val converters = scala.jdk.CollectionConverters
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package io.circe.config


// Probably not needed after https://github.com/scala/scala-collection-compat/pull/217
package object compat {
val converters = scala.collection.JavaConverters
}
2 changes: 1 addition & 1 deletion src/main/scala/io.circe.config/package.scala
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
package io.circe

import com.typesafe.config._
import scala.collection.JavaConverters._
import config.compat.converters._

/**
* circe-config: A [[https://github.com/lightbend/config Typesafe config]]
Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/io.circe.config/parser.scala
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import cats.syntax.bifunctor._
import cats.instances.either._
import java.io.File

import scala.collection.JavaConverters._
import compat.converters._
import com.typesafe.config._

/**
Expand Down
6 changes: 3 additions & 3 deletions src/test/scala/io.circe.config/CirceConfigLaws.scala
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ import cats.laws._
import cats.laws.discipline._
import io.circe.{ Decoder, Json, Parser, ParsingFailure }
import io.circe.testing.ParserTests
import org.scalatest.FlatSpec
import org.scalatest.prop.Checkers
import org.scalatest.flatspec.AnyFlatSpec
import org.scalatestplus.scalacheck.Checkers
import org.scalacheck.{ Arbitrary, Prop }
import org.typelevel.discipline.Laws
import com.typesafe.config.{parser => _, _}

class CirceConfigLaws extends FlatSpec {
class CirceConfigLaws extends AnyFlatSpec {

implicit val arbitraryConfigJson: Arbitrary[Json] = Arbitrary {
def normalize(json: Json): Json = json
Expand Down
6 changes: 4 additions & 2 deletions src/test/scala/io.circe.config/CirceConfigSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
package io.circe.config

import cats.effect.IO
import org.scalatest.{FlatSpec, Matchers}
import org.scalatest.Matchers
import org.scalatest.flatspec.AnyFlatSpec
import com.typesafe.config.{parser => _, _}
import io.circe.{parser => _, _}
import io.circe.generic.auto._
Expand All @@ -25,7 +26,8 @@ import scala.concurrent.duration._
import scala.io.Source
import io.circe.config.syntax._

class CirceConfigSpec extends FlatSpec with Matchers {

class CirceConfigSpec extends AnyFlatSpec with Matchers {
import CirceConfigSpec._

trait ParserTests {
Expand Down