Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Play 3.0 compatibility #123

Merged
merged 1 commit into from
Nov 1, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 8 additions & 11 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -177,12 +177,13 @@ lazy val `weejson-play-base` = (project in file("weejson-play"))

def playProject(playVersion: String, scalaVersions: Seq[String]) = {
val playString = playVersion.split('.').take(2).mkString("play", "", "")
val playOrg =
if (playVersion.startsWith("3")) "org.playframework"
else "com.typesafe.play"
Project(s"weejson-$playString", file(s"weejson-$playString"))
.dependsOn(weepickle)
.settings(
libraryDependencies ++= Seq(
"com.typesafe.play" %% "play-json" % playVersion,
),
libraryDependencies += playOrg %% "play-json" % playVersion,
Compile / unmanagedSourceDirectories ++= (`weejson-play-base` / Compile / unmanagedSourceDirectories).value,
Test / unmanagedSourceDirectories ++= (`weejson-play-base` / Test / unmanagedSourceDirectories).value,
crossScalaVersions := scalaVersions,
Expand All @@ -201,14 +202,10 @@ lazy val `weejson-play28` = playProject("2.8.2", Seq(scala213))
// and no version of Play actually uses play-json 2.9
lazy val `weejson-play29` = playProject("2.9.4", Seq(scala213))

lazy val `weejson-play210` = playProject("2.10.1", Seq(scala213, scala3)).settings(
mimaPreviousArtifacts := {
if (VersionNumber(version.value).matchesSemVer(SemanticSelector("<1.9.0")) && scalaBinaryVersion.value == "2.13")
Set.empty // TODO: remove once there's a previous Scala 2.13 artifact
else
mimaPreviousArtifacts.value
}
)
lazy val `weejson-play210` = playProject("2.10.2", Seq(scala213, scala3))

lazy val `weejson-play30` = playProject("3.0.0", Seq(scala213, scala3))
.settings(mimaPreviousArtifacts := Set.empty) // TODO: remove once there's a previous artifact

lazy val `weejson-upickle` = project
.dependsOn(weepickle)
Expand Down
Loading