Skip to content

Commit

Permalink
drop 2.10; update to 2.13.0-M4
Browse files Browse the repository at this point in the history
  • Loading branch information
larsrh committed Jun 25, 2018
1 parent f5c145f commit c4b31ec
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 57 deletions.
3 changes: 1 addition & 2 deletions .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:
Expand Down
55 changes: 5 additions & 50 deletions build.sbt
Expand Up @@ -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",
Expand All @@ -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](
Expand Down Expand Up @@ -90,52 +83,14 @@ lazy val commonSettings = Seq(
)
)

val specs2Version = SettingKey[String]("specs2Version")

lazy val root = project.in(file("."))
.settings(commonSettings: _*)
.settings(noPublishSettings: _*)
.aggregate(disciplineJS, disciplineJVM)

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
Expand Down
2 changes: 1 addition & 1 deletion 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")
2 changes: 1 addition & 1 deletion shared/src/main/scala/specs2/Discipline.scala
Expand Up @@ -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
}
}
Expand Down
6 changes: 3 additions & 3 deletions shared/src/main/scala/specs2/mutable/Discipline.scala
Expand Up @@ -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)
}
}
Expand Down

0 comments on commit c4b31ec

Please sign in to comment.