Skip to content

Commit

Permalink
Updates for Scala 2.13.0
Browse files Browse the repository at this point in the history
  • Loading branch information
travisbrown committed Jun 14, 2019
1 parent d450eb8 commit 20fd658
Show file tree
Hide file tree
Showing 9 changed files with 36 additions and 35 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ language: scala
scala:
- 2.11.12
- 2.12.8
- 2.13.0-M5
- 2.13.0

jdk:
- oraclejdk8
Expand Down
21 changes: 12 additions & 9 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@ val compilerOptions = Seq(
"-language:higherKinds",
"-unchecked",
"-Ywarn-dead-code",
"-Ywarn-numeric-widen",
"-Xfuture"
"-Ywarn-numeric-widen"
)

val Versions = new {
val circe = "0.11.1"
val discipline = "0.10.0"
val circe = "0.12.0-M3"
val discipline = "0.12.0-M3"
val scalaCheck = "1.14.0"
val scalaTest = "3.0.6-SNAP5"
val scalaTest = "3.1.0-SNAP13"
val scalaTestPlus = "1.0.0-SNAP8"
val snakeYaml = "1.24"
val previousCirceYaml = "0.9.0"
val previousCirceYaml = "0.10.0"
}

val docMappingsApiDir = settingKey[String]("Subdirectory in site target directory for API docs")
Expand All @@ -33,8 +33,9 @@ val root = project.in(file("."))
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, v)) if v <= 12 =>
Seq(
"-Xfuture",
"-Yno-adapted-args",
"-Ywarn-unused-import",
"-Ywarn-unused-import"
)
case _ =>
Seq(
Expand All @@ -53,9 +54,11 @@ val root = project.in(file("."))
"io.circe" %% "circe-jawn" % Versions.circe % Test,
"org.yaml" % "snakeyaml" % Versions.snakeYaml,
"io.circe" %% "circe-testing" % Versions.circe % Test,
"org.typelevel" %% "discipline" % Versions.discipline % Test,
"org.typelevel" %% "discipline-core" % Versions.discipline % Test,
"org.typelevel" %% "discipline-scalatest" % 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
),
mimaPreviousArtifacts := Set("io.circe" %% "circe-yaml" % Versions.previousCirceYaml)
)
Expand Down
18 changes: 6 additions & 12 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,19 +1,13 @@
logLevel := Level.Warn

resolvers ++= Seq(
Classpaths.typesafeReleases,
Classpaths.sbtPluginReleases,
"jgit-repo" at "http://download.eclipse.org/jgit/maven"
)

addSbtPlugin("com.dwijnand" % "sbt-travisci" % "1.1.3")
addSbtPlugin("com.dwijnand" % "sbt-travisci" % "1.2.0")
addSbtPlugin("com.github.gseitz" % "sbt-release" % "1.0.11")
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.1.2")
addSbtPlugin("com.typesafe.sbt" % "sbt-ghpages" % "0.6.2")
addSbtPlugin("com.typesafe.sbt" % "sbt-ghpages" % "0.6.3")
addSbtPlugin("com.typesafe.sbt" % "sbt-git" % "1.0.0")
addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "0.3.0")
addSbtPlugin("com.typesafe.sbt" % "sbt-site" % "1.3.2")
addSbtPlugin("io.get-coursier" % "sbt-coursier" % "1.0.3")
addSbtPlugin("com.typesafe.sbt" % "sbt-site" % "1.4.0")
addSbtPlugin("io.get-coursier" % "sbt-coursier" % "1.1.0-M13-4")
addSbtPlugin("org.scalastyle" %% "scalastyle-sbt-plugin" % "1.0.0")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.6.0-M5")
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "2.3")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.6.0")
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "2.5")
7 changes: 4 additions & 3 deletions src/test/scala/io/circe/yaml/EscapingTests.scala
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
package io.circe.yaml

import io.circe.Encoder
import org.scalatest.{FlatSpec, Matchers}
import org.scalatest.prop.PropertyChecks
import org.scalatest.Matchers
import org.scalatest.flatspec.AnyFlatSpec
import org.scalatestplus.scalacheck.ScalaCheckDrivenPropertyChecks
import scala.util.{Success, Try}

class EscapingTests extends FlatSpec with Matchers with PropertyChecks {
class EscapingTests extends AnyFlatSpec with Matchers with ScalaCheckDrivenPropertyChecks {

import io.circe.syntax._
import io.circe.yaml.Printer.spaces2.pretty
Expand Down
4 changes: 2 additions & 2 deletions src/test/scala/io/circe/yaml/ExampleFileTests.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ package io.circe.yaml

import java.io.{File, InputStreamReader}

import org.scalatest.FreeSpec
import org.scalatest.freespec.AnyFreeSpec
import scala.io.Source

class ExampleFileTests extends FreeSpec {
class ExampleFileTests extends AnyFreeSpec {

"yaml test files" - {

Expand Down
5 changes: 3 additions & 2 deletions src/test/scala/io/circe/yaml/ParserTests.scala
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package io.circe.yaml

import io.circe.Json
import org.scalatest.{EitherValues, FlatSpec, Matchers}
import org.scalatest.{EitherValues, Matchers}
import org.scalatest.flatspec.AnyFlatSpec

class ParserTests extends FlatSpec with Matchers with EitherValues {
class ParserTests extends AnyFlatSpec with Matchers with EitherValues {
// the laws should do a pretty good job of surfacing errors; these are mainly to ensure test coverage

"Parser" should "fail on invalid tagged numbers" in {
Expand Down
5 changes: 3 additions & 2 deletions src/test/scala/io/circe/yaml/PrinterTests.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ package io.circe.yaml

import io.circe.Json
import io.circe.yaml.Printer.{FlowStyle, LineBreak, StringStyle, YamlVersion}
import org.scalatest.{FreeSpec, Matchers}
import org.scalatest.Matchers
import org.scalatest.freespec.AnyFreeSpec

class PrinterTests extends FreeSpec with Matchers {
class PrinterTests extends AnyFreeSpec with Matchers {

"Flow style" - {
val json = Json.obj("foo" -> Json.arr((0 until 3).map(_.toString).map(Json.fromString): _*))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package io.circe.yaml
import io.circe.Json
import io.circe.Json.eqJson
import io.circe.testing.instances._
import org.scalatest.FunSuite
import org.scalatest.funsuite.AnyFunSuite
import org.typelevel.discipline.scalatest.Discipline

class SnakeYamlSymmetricSerializationTests extends FunSuite with Discipline with SymmetricSerializationTests {
class SnakeYamlSymmetricSerializationTests extends AnyFunSuite with Discipline with SymmetricSerializationTests {
override val laws: SymmetricSerializationLaws = SymmetricSerializationLaws()

checkAll("snake.printer", symmetricPrinter[Json](printer.print, parser.parse))
Expand Down
5 changes: 3 additions & 2 deletions src/test/scala/io/circe/yaml/SyntaxTests.scala
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package io.circe.yaml

import io.circe.Json
import org.scalatest.{FlatSpec, Matchers}
import org.scalatest.Matchers
import org.scalatest.flatspec.AnyFlatSpec
import syntax._

class SyntaxTests extends FlatSpec with Matchers {
class SyntaxTests extends AnyFlatSpec with Matchers {

val json = Json.obj(
"foo" -> Json.obj(
Expand Down

0 comments on commit 20fd658

Please sign in to comment.