diff --git a/.travis.yml b/.travis.yml index 8e15b8c..be39a9b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,9 +1,8 @@ language: scala scala: - - 2.10.7 - 2.11.12 - 2.12.6 - - 2.13.0-M3 + - 2.13.0-M4 jdk: - oraclejdk8 script: diff --git a/build.sbt b/build.sbt index 6ad68f3..f17927d 100644 --- a/build.sbt +++ b/build.sbt @@ -10,7 +10,7 @@ import com.typesafe.sbt.pgp.PgpKeys._ name := "discipline root project" lazy val commonSettings = Seq( - crossScalaVersions := Seq("2.10.7", "2.11.12", "2.12.6", "2.13.0-M3"), + crossScalaVersions := Seq("2.11.12", "2.12.6", "2.13.0-M4"), organization := "org.typelevel", name := "discipline", scalaVersion := "2.12.6", @@ -21,17 +21,10 @@ lazy val commonSettings = Seq( "-language:implicitConversions" ), libraryDependencies ++= Seq( - "org.scalacheck" %%% "scalacheck" % "1.13.5" + "org.scalacheck" %%% "scalacheck" % "1.14.0", + "org.scalatest" %%% "scalatest" % "3.0.6-SNAP1" % "optional", + "org.specs2" %%% "specs2-scalacheck" % "4.3.0" % "optional" ), - libraryDependencies += { - CrossVersion.partialVersion(scalaVersion.value) match { - case Some((2, 13)) => - "org.scalatest" %%% "scalatest" % "3.0.5-M1" % "optional" - case _ => - "org.scalatest" %%% "scalatest" % "3.0.5" % "optional" - } - }, - resolvers += "scalaz-bintray" at "http://dl.bintray.com/scalaz/releases", scalacOptions in Test ++= Seq("-Yrangepos"), releaseProcess := Seq[ReleaseStep]( @@ -90,8 +83,6 @@ lazy val commonSettings = Seq( ) ) -val specs2Version = SettingKey[String]("specs2Version") - lazy val root = project.in(file(".")) .settings(commonSettings: _*) .settings(noPublishSettings: _*) @@ -99,43 +90,7 @@ lazy val root = project.in(file(".")) lazy val discipline = crossProject.in(file(".")) .settings(commonSettings: _*) - .jvmSettings( - specs2Version := { - CrossVersion.partialVersion(scalaVersion.value) match { - case Some((2, n)) if n == 10 => - "3.9.1" - case _ => - "4.0.3" - } - }, - libraryDependencies ++= Seq( - "org.specs2" %% "specs2-core" % specs2Version.value % "optional", - "org.specs2" %% "specs2-scalacheck" % specs2Version.value % "optional" - ) - ) - .jsSettings( - scalaJSStage in Test := FastOptStage, - specs2Version := "4.0.3", - libraryDependencies ++= { - CrossVersion.partialVersion(scalaVersion.value) match { - case Some((2, n)) if n == 10 => - Seq() - case _ => - Seq( - "org.specs2" %%% "specs2-core" % specs2Version.value % "optional", - "org.specs2" %%% "specs2-scalacheck" % specs2Version.value % "optional" - ) - } - }, - excludeFilter in unmanagedSources := { - CrossVersion.partialVersion(scalaVersion.value) match { - case Some((2, n)) if n == 10 => - HiddenFileFilter || "*specs2*" || "*LawSpec.scala" - case _ => - "" - } - } - ) + .jsSettings(scalaJSStage in Test := FastOptStage) lazy val disciplineJVM = discipline.jvm lazy val disciplineJS = discipline.js diff --git a/project/plugins.sbt b/project/plugins.sbt index 2a8fdee..124578c 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,3 +1,3 @@ addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.1.0") addSbtPlugin("com.github.gseitz" % "sbt-release" % "1.0.7") -addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.22") +addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.23") diff --git a/shared/src/main/scala/specs2/Discipline.scala b/shared/src/main/scala/specs2/Discipline.scala index e34ea5a..fd4ac52 100644 --- a/shared/src/main/scala/specs2/Discipline.scala +++ b/shared/src/main/scala/specs2/Discipline.scala @@ -12,7 +12,7 @@ trait Discipline extends ScalaCheck { self: SpecificationLike => def checkAll(name: String, ruleSet: Laws#RuleSet)(implicit p: Parameters) = { s"""${ruleSet.name} laws must hold for ${name}""" ^ br ^ - Fragments.foreach(ruleSet.all.properties) { case (id, prop) => + Fragments.foreach(ruleSet.all.properties.toList) { case (id, prop) => id ! check(prop, p, defaultFreqMapPretty) ^ br } } diff --git a/shared/src/main/scala/specs2/mutable/Discipline.scala b/shared/src/main/scala/specs2/mutable/Discipline.scala index f047fd1..96c309f 100644 --- a/shared/src/main/scala/specs2/mutable/Discipline.scala +++ b/shared/src/main/scala/specs2/mutable/Discipline.scala @@ -11,9 +11,9 @@ import org.specs2.specification.core.Fragments trait Discipline extends ScalaCheck { self: SpecificationLike => def checkAll(name: String, ruleSet: Laws#RuleSet)(implicit p: Parameters) = { - s"""${ruleSet.name} laws must hold for ${name}""".txt - br - Fragments.foreach(ruleSet.all.properties) { case (id, prop) => + s"""${ruleSet.name} laws must hold for ${name}""".txt + br + Fragments.foreach(ruleSet.all.properties.toList) { case (id, prop) => id in check(prop, p, defaultFreqMapPretty) } }