Skip to content

Commit

Permalink
Only use kind-projector plugin under scala 2
Browse files Browse the repository at this point in the history
  • Loading branch information
dimitarg committed Oct 30, 2024
1 parent f71ae78 commit 2537fbb
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,23 @@ libraryDependencies ++=Seq(

testFrameworks += new TestFramework("weaver.framework.CatsEffect")

addCompilerPlugin("org.typelevel" % "kind-projector" % "0.13.3" cross CrossVersion.full)
libraryDependencies ++= {
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, n)) =>
List(
compilerPlugin("org.typelevel" % "kind-projector" % "0.13.3" cross CrossVersion.full)
)
case _ =>
Nil
}
}

ThisBuild / scalacOptions ++= {
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((3, _)) => Seq("-Ykind-projector:underscores")
case Some((2, 12 | 13)) => Seq("-Xsource:3", "-P:kind-projector:underscore-placeholders")
}
}

releasePublishArtifactsAction := PgpKeys.publishSigned.value

Expand Down

0 comments on commit 2537fbb

Please sign in to comment.