Skip to content

Commit

Permalink
suppressed the conditions for depending on libraries when scala is <=…
Browse files Browse the repository at this point in the history
… 2.10
  • Loading branch information
etorreborre committed Feb 19, 2018
1 parent fb7b5d0 commit 9b598e7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 17 deletions.
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ lazy val common = crossProject(JSPlatform, JVMPlatform).in(file("common")).
depends.reflect(scalaOrganization.value, scalaVersion.value) ++
depends.paradise(scalaVersion.value) ++
depends.scalaParser.value ++
depends.scalaXML(scalaVersion.value),
depends.scalaXML.value,
moduleSettings("common")++
Seq(name := "specs2-common")
).
Expand Down
19 changes: 4 additions & 15 deletions project/depends.scala
Original file line number Diff line number Diff line change
Expand Up @@ -27,27 +27,16 @@ object depends {
scalaJSStage in Test := FastOptStage)

def scalaParser = Def.setting {
if (scalaMinorVersionAtLeast(scalaVersion.value, 11))
Seq("org.scala-lang.modules" %%% "scala-parser-combinators" % "1.1.0")
else
Seq()
Seq("org.scala-lang.modules" %%% "scala-parser-combinators" % "1.1.0")
}

def scalaXML(scalaVersion: String) =
if (scalaMinorVersionAtLeast(scalaVersion, 11))
Seq("org.scala-lang.modules" %% "scala-xml" % "1.0.6")
else
Seq()
def scalaXML = Def.setting {
Seq("org.scala-lang.modules" %% "scala-xml" % "1.0.6")
}

def kindp(scalaVersion: String) =
"org.spire-math" % "kind-projector" % "0.8.2" cross CrossVersion.binary

def si2712Dependency(scalaVersion: String) =
if (CrossVersion.partialVersion(scalaVersion).exists(_._2 < 11))
Seq(compilerPlugin("com.milessabin" % ("si2712fix-plugin_"+scalaVersion) % "1.2.0"))
else
Seq()

lazy val mockito = Seq("org.mockito" % "mockito-core" % "2.7.22")
lazy val junit = Seq("junit" % "junit" % "4.12")
lazy val hamcrest = Seq("org.hamcrest" % "hamcrest-core" % "1.3")
Expand Down
2 changes: 1 addition & 1 deletion version.sbt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version in ThisBuild := "4.0.2"
version in ThisBuild := "4.0.3"

0 comments on commit 9b598e7

Please sign in to comment.