Skip to content

Commit

Permalink
Test compatibility with enumeratum for all Scala Platforms (JVM, Scal…
Browse files Browse the repository at this point in the history
…a.js, Scala Native)
  • Loading branch information
plokhotnyuk committed Oct 6, 2024
1 parent 51ddada commit e524de0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 18 deletions.
19 changes: 2 additions & 17 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,8 @@ lazy val `jsoniter-scala-macros` = crossProject(JVMPlatform, JSPlatform, NativeP
crossScalaVersions := Seq("3.3.4", "2.13.15", "2.12.20"),
libraryDependencies ++= (CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, _)) => Seq(
"org.scala-lang" % "scala-reflect" % scalaVersion.value
"org.scala-lang" % "scala-reflect" % scalaVersion.value,
"com.beachape" %%% "enumeratum" % "1.7.5" % Test
)
case _ => Seq()
}) ++ Seq(
Expand All @@ -201,25 +202,9 @@ lazy val `jsoniter-scala-macros` = crossProject(JVMPlatform, JSPlatform, NativeP
)

lazy val `jsoniter-scala-macrosJVM` = `jsoniter-scala-macros`.jvm
.settings(
libraryDependencies ++= (CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, _)) => Seq(
"com.beachape" %%% "enumeratum" % "1.7.5" % Test
)
case _ => Seq()
})
)

lazy val `jsoniter-scala-macrosJS` = `jsoniter-scala-macros`.js
.settings(jsSettings)
.settings(
libraryDependencies ++= (CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, _)) => Seq(
"com.beachape" %%% "enumeratum" % "1.7.5" % Test
)
case _ => Seq()
})
)

lazy val `jsoniter-scala-macrosNative` = `jsoniter-scala-macros`.native
.settings(nativeSettings)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ object MyEnum extends enumeratum.Enum[MyEnum] {
class JsonCodecMakerEnumeratumSpec extends VerifyingSpec {
import com.github.plokhotnyuk.jsoniter_scala.core._
import com.github.plokhotnyuk.jsoniter_scala.macros.JsonCodecMaker._
import com.github.plokhotnyuk.jsoniter_scala.macros.NamespacePollutions._

"Value codecs for Enumeratum enum" should {
"serialize and deserialize when derived by macros" in {
Expand Down

0 comments on commit e524de0

Please sign in to comment.