lloydmeta / enumeratum

A type-safe, reflection-free, powerful enumeration implementation for Scala with exhaustive pattern match warnings and helpful integrations.
MIT License
1.18k stars 146 forks source link

Support play-json 3.0.x #382

Closed matmannion closed 7 months ago

matmannion commented 8 months ago

play-json 3.0 and later has changed the groupId from com.typesafe.play to org.playframework (https://github.com/playframework/play-json/releases/tag/3.0.0). The packages themselves are the same, but to support play-json going forward will require either separate publishes for the 2.10.x and 3.0.x branches or a wholesale move to 3.0.x.

As a workaround, it still uses the same package names so this library can be used by including the dependency directly and adding an exclusion rule, e.g.

libraryDependencies ++= Seq(
  "org.playframework" %% "play-json" % "3.0.1",
  "com.beachape" %% "enumeratum-play-json" % "1.7.3"
)

excludeDependencies ++= Seq(
  // As of Play 3.0, groupId has changed to org.playframework; exclude transitive dependencies to the old artifacts
  ExclusionRule(organization = "com.typesafe.play")
)

It may be worth marking the dependency as Optional in the library, to avoid pulling in incompatible play-json dependencies as various libraries update to support 3.x