Skip to content

Commit

Permalink
Mise à jour vers Play 3.0 / Apache Pekko
Browse files Browse the repository at this point in the history
  • Loading branch information
niladic committed Dec 1, 2023
1 parent f1719f7 commit 668ed62
Show file tree
Hide file tree
Showing 13 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion app/filters/SentryFilter.scala
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package filters

import akka.stream.Materializer
import cats.syntax.all._
import io.sentry.{ITransaction, Sentry, SpanStatus}
import javax.inject.Inject
import org.apache.pekko.stream.Materializer
import play.api.mvc.{Filter, RequestHeader, Result}
import scala.concurrent.{ExecutionContext, Future}
import serializers.Keys
Expand Down
4 changes: 2 additions & 2 deletions app/helper/OvhApi.scala
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import java.nio.charset.StandardCharsets.UTF_8
import java.security.MessageDigest
import java.time.ZonedDateTime

import akka.stream.Materializer
import akka.util.ByteString
import cats.syntax.all._
import models.{Error, EventType}
import org.apache.pekko.stream.Materializer
import org.apache.pekko.util.ByteString
import play.api.libs.json.{JsValue, Json, Reads, Writes}
import play.api.libs.ws.{WSClient, WSResponse}
import play.api.mvc.{PlayBodyParsers, Request}
Expand Down
4 changes: 2 additions & 2 deletions app/services/EmailsService.scala
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package services

import akka.stream.scaladsl.{RestartSource, Sink, Source}
import akka.stream.{Materializer, RestartSettings}
import cats.data.NonEmptyList
import cats.syntax.all._
import helper.MiscHelpers
import javax.inject.{Inject, Singleton}
import models.EmailPriority
import modules.AppConfig
import org.apache.pekko.stream.scaladsl.{RestartSource, Sink, Source}
import org.apache.pekko.stream.{Materializer, RestartSettings}
import play.api.Logger
import play.api.libs.concurrent.MaterializerProvider
import play.api.libs.mailer.{Email, SMTPConfiguration, SMTPMailer}
Expand Down
6 changes: 3 additions & 3 deletions app/services/FileService.scala
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
package services

import akka.Done
import akka.actor.ActorSystem
import akka.stream.scaladsl._
import anorm._
import aplus.macros.Macros
import cats.syntax.all._
Expand All @@ -15,6 +12,9 @@ import javax.inject.{Inject, Singleton}
import models.{Error, EventType, FileMetadata, User}
import models.dataModels.FileMetadataRow
import modules.AppConfig
import org.apache.pekko.Done
import org.apache.pekko.actor.ActorSystem
import org.apache.pekko.stream.scaladsl._
import play.api.mvc.Request
import play.api.libs.concurrent.{ActorSystemProvider, MaterializerProvider}
import play.api.db.Database
Expand Down
4 changes: 2 additions & 2 deletions app/services/NotificationService.scala
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package services

import akka.stream.scaladsl.{Sink, Source}
import akka.stream.{ActorAttributes, Materializer, Supervision}
import cats.syntax.all._
import constants.Constants
import controllers.routes
Expand All @@ -10,6 +8,8 @@ import java.time.ZoneId
import java.util.UUID
import javax.inject.{Inject, Singleton}
import models._
import org.apache.pekko.stream.scaladsl.{Sink, Source}
import org.apache.pekko.stream.{ActorAttributes, Materializer, Supervision}
import play.api.libs.concurrent.MaterializerProvider
import play.api.libs.mailer.Email
import play.api.mvc.Request
Expand Down
2 changes: 1 addition & 1 deletion app/services/ServicesDependencies.scala
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package services

import akka.actor.ActorSystem
import cats.effect.unsafe.IORuntime
import javax.inject.{Inject, Singleton}
import org.apache.pekko.actor.ActorSystem
import play.api.inject.ApplicationLifecycle
import scala.concurrent.{ExecutionContext, Future}

Expand Down
2 changes: 1 addition & 1 deletion app/services/SmsApi.scala
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package services

import akka.stream.Materializer
import cats.syntax.all._
import helper.{MessageBirdApi, OvhApi, Time}
import java.time.ZonedDateTime
import models.{Error, EventType, Sms, User}
import org.apache.pekko.stream.Materializer
import play.api.Configuration
import play.api.libs.concurrent.Futures
import play.api.libs.json.Json
Expand Down
2 changes: 1 addition & 1 deletion app/tasks/AutoAddExpertTask.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ package tasks

import java.util.UUID

import akka.actor._
import cats.syntax.all._
import helper.Time
import javax.inject.Inject
import models.Answer.AnswerType
import models._
import modules.AppConfig
import org.apache.pekko.actor._
import services._

import scala.concurrent.duration._
Expand Down
2 changes: 1 addition & 1 deletion app/tasks/RemoveExpiredFilesTask.scala
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import java.io.File
import java.time.Instant
import java.time.temporal.ChronoUnit.DAYS

import akka.actor.ActorSystem
import javax.inject.Inject
import models.EventType
import org.apache.pekko.actor.ActorSystem
import play.api.Configuration
import services.{EventService, FileService}

Expand Down
2 changes: 1 addition & 1 deletion app/tasks/WeeklyEmailsTask.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ package tasks
import java.time.temporal.ChronoUnit
import java.time.{DayOfWeek, ZonedDateTime}

import akka.actor.ActorSystem
import cats.Eq
import cats.syntax.all._
import helper.Time
import javax.inject.Inject
import org.apache.pekko.actor.ActorSystem
import play.api.Configuration
import services.NotificationService

Expand Down
2 changes: 1 addition & 1 deletion app/tasks/WipeOldDataTask.scala
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package tasks

import akka.actor.ActorSystem
import java.time.{Duration, ZonedDateTime}
import javax.inject.Inject
import models.{EventType, User}
import org.apache.pekko.actor.ActorSystem
import play.api.Configuration
import scala.concurrent.duration._
import scala.concurrent.ExecutionContext
Expand Down
6 changes: 3 additions & 3 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ libraryDependencies += guice
libraryDependencies ++= Seq(
"org.postgresql" % "postgresql" % "42.7.0",
anormDependency,
"com.typesafe.play" %% "play-mailer" % "9.0.0",
"com.typesafe.play" %% "play-json" % "2.10.3",
"org.playframework" %% "play-mailer" % "10.0.0",
"org.playframework" %% "play-json" % "3.0.1",
"com.sun.mail" % "javax.mail" % "1.6.2",
"net.jcazevedo" %% "moultingyaml" % "0.4.2",
"com.github.tototoshi" %% "scala-csv" % "1.3.10",
Expand All @@ -104,7 +104,7 @@ libraryDependencies ++= Seq(

// UI
libraryDependencies ++= Seq(
"org.webjars" %% "webjars-play" % "2.9.0",
"org.webjars" %% "webjars-play" % "3.0.0",
"org.webjars.bower" % "material-design-lite" % "1.3.0",
"org.webjars" % "material-design-icons" % "4.0.0",
"org.webjars.npm" % "roboto-fontface" % "0.10.0",
Expand Down
2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// The Play plugin
// Important note: when upgrading the play version, check that the correct minor version
// of jackson is set in build.sbt (with the patch version that is not vulnerable)
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.9.0")
addSbtPlugin("org.playframework" % "sbt-plugin" % "3.0.0")
addSbtPlugin("net.virtual-void" % "sbt-dependency-graph" % "0.10.0-RC1")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.9")
addSbtPlugin("com.typesafe.sbt" % "sbt-digest" % "1.1.4")
Expand Down

0 comments on commit 668ed62

Please sign in to comment.