Skip to content

Commit

Permalink
chore: remove unused paradise dependency (#1246)
Browse files Browse the repository at this point in the history
  • Loading branch information
NTPape authored Jun 8, 2024
1 parent c0e99aa commit 7c77126
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 24 deletions.
9 changes: 1 addition & 8 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import sbt._
import Defaults._
import java.util.{Date, TimeZone}
import java.text.SimpleDateFormat
// shadow sbt-scalajs' crossProject and CrossType until Scala.js 1.0.0 is released
import sbtcrossproject.CrossPlugin.autoImport.{crossProject, CrossType}

Expand Down Expand Up @@ -116,7 +114,6 @@ lazy val catsNative = cats.native
lazy val common = crossProject(JSPlatform, JVMPlatform, NativePlatform).in(file("common")).
settings(
libraryDependencies ++=
depends.paradise(scalaVersion.value) ++
Seq(depends.reflect(scalaOrganization.value, scalaVersion.value),
depends.scalacheck.value % Test),
commonSettings,
Expand Down Expand Up @@ -146,7 +143,6 @@ lazy val core = crossProject(JSPlatform, JVMPlatform, NativePlatform).in(file("c
commonSettings,
name := "specs2-core",
libraryDependencies ++=
depends.paradise(scalaVersion.value) ++
Seq(
depends.mockito % Test,
depends.junit % Test)
Expand Down Expand Up @@ -286,9 +282,7 @@ lazy val matcherNative = matcher.native
lazy val matcherExtra = crossProject(JSPlatform, JVMPlatform, NativePlatform).in(file("matcher-extra")).
settings(
commonSettings,
name := "specs2-matcher-extra",
libraryDependencies ++= depends.paradise(scalaVersion.value)
).
name := "specs2-matcher-extra").
jsSettings(depends.jsTest, commonJsSettings).
jvmSettings(depends.jvmTest, commonJvmSettings).
nativeSettings(depends.nativeTest, commonNativeSettings).
Expand All @@ -309,7 +303,6 @@ lazy val shapeless = crossProject(JSPlatform, JVMPlatform, NativePlatform).
settings(
commonSettings,
name := "specs2-shapeless",
libraryDependencies ++= depends.paradise(scalaVersion.value),
libraryDependencies += "com.chuusai" %%% "shapeless" % shapelessVersion
).
jsSettings(depends.jsTest, commonJsSettings).
Expand Down
16 changes: 0 additions & 16 deletions project/depends.scala
Original file line number Diff line number Diff line change
Expand Up @@ -61,23 +61,7 @@ object depends {
"org.scalacheck" %%% "scalacheck" % "1.18.0"
}

def paradise(scalaVersion: String) =
if (scalaMinorVersionAtLeast(scalaVersion, 11))
Nil
else
Seq(compilerPlugin(
"org.scalamacros" %% "paradise" % "2.1.0" cross CrossVersion.patch),
"org.scalamacros" %% "quasiquotes" % "2.1.0")

lazy val resolvers =
Seq(sbt.Keys.resolvers ++= Resolver.sonatypeOssRepos("releases"))

def scalaMinorVersionAtLeast(scalaVersion: String, n: Int): Boolean =
CrossVersion.partialVersion(scalaVersion) match {
case Some((2, minor)) if minor >= n =>
true
case _ =>
false
}

}

0 comments on commit 7c77126

Please sign in to comment.