Skip to content

Commit

Permalink
Merge pull request #201 from mcornejo/play_30
Browse files Browse the repository at this point in the history
Update to play 3.0 and scala 3.3.1
  • Loading branch information
jilen authored Nov 11, 2023
2 parents 1a11c48 + 4ca024d commit c6721a3
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 31 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ For play 2.8.x

> libraryDependencies += "com.dripower" %% "play-circe" % "2814.1"
For play 3.0.x

> libraryDependencies += "com.dripower" %% "play-circe" % "3000.0"

Usage
-----
Expand Down
35 changes: 13 additions & 22 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,41 +1,32 @@
import ReleaseTransformations._

organization := "com.dripower"
name := "play-circe"
scalaVersion := "2.13.12"
crossScalaVersions := Seq("2.12.18", "2.13.12", "3.3.1")
organization := "com.dripower"
name := "play-circe"
scalaVersion := "3.3.1"

val playV = "2.8.20"
val playV = "3.0.0"
val circeV = "0.14.6"

val crossDeps = Seq(
"io.circe" %% "circe-core" % circeV,
"io.circe" %% "circe-parser" % circeV,
"io.circe" %% "circe-generic" % circeV % Test,
"org.scalameta" %% "munit" % "1.0.0-M10" % Test,
"org.hamcrest" % "hamcrest" % "2.2" % Test
"io.circe" %% "circe-core" % circeV,
"io.circe" %% "circe-parser" % circeV,
"io.circe" %% "circe-generic" % circeV % Test,
"org.scalameta" %% "munit" % "1.0.0-M10" % Test,
"org.hamcrest" % "hamcrest" % "2.2" % Test,
"org.playframework" %% "play" % playV % Provided,
"org.playframework" %% "play-guice" % playV % Provided
)

val scala2Deps = Seq(
"com.typesafe.play" %% "play" % playV % Provided,
"com.typesafe.play" %% "play-guice" % playV % Provided
).map(_.cross(CrossVersion.for3Use2_13))

libraryDependencies ++= (crossDeps ++ scala2Deps)
libraryDependencies ++= crossDeps

scalacOptions := {
val base = Seq(
Seq(
"-release:11",
"-deprecation",
"-encoding",
"UTF-8",
"-feature"
)
if (scalaVersion.value.startsWith("3.")) {
base
} else {
base ++ Seq("-Xlint")
}
}

// POM settings for Sonatype
Expand Down
4 changes: 2 additions & 2 deletions src/main/scala/play/api/libs/circe/Circe.scala
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package play.api.libs.circe

import akka.stream.scaladsl.{Flow, Sink}
import akka.util.ByteString
import org.apache.pekko.stream.scaladsl.{Flow, Sink}
import org.apache.pekko.util.ByteString
import cats.syntax.all._
import io.circe.{Codec => _, _}
import org.slf4j._
Expand Down
2 changes: 1 addition & 1 deletion src/test/scala/play/api/libs/circe/CirceController.scala
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package play.api.libs.circe

import akka.actor._
import org.apache.pekko.actor._
import io.circe.{Printer, Json}
import io.circe.syntax._
import play.api.mvc._
Expand Down
8 changes: 4 additions & 4 deletions src/test/scala/play/api/libs/circe/CirceSpec.scala
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package play.api.libs.circe

import akka.actor.ActorSystem
import akka.stream.Materializer
import akka.stream.scaladsl.Source
import akka.util.ByteString
import org.apache.pekko.actor.ActorSystem
import org.apache.pekko.stream.Materializer
import org.apache.pekko.stream.scaladsl.Source
import org.apache.pekko.util.ByteString
import io.circe.syntax._
import play.api.mvc._
import play.api.inject.guice._
Expand Down
2 changes: 1 addition & 1 deletion src/test/scala/play/api/libs/circe/Fakes.scala
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package play.api.libs.circe

import akka.util.ByteString
import org.apache.pekko.util.ByteString

import java.net.URI
import java.security.cert.X509Certificate
Expand Down
2 changes: 1 addition & 1 deletion version.sbt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ThisBuild / version := "2814.5-SNAPSHOT"
ThisBuild / version := "3000.0-SNAPSHOT"

0 comments on commit c6721a3

Please sign in to comment.