From d649bdf8ea5daf8546f3fc91f86a80d987b9b098 Mon Sep 17 00:00:00 2001 From: xuwei-k <6b656e6a69@gmail.com> Date: Sat, 7 Oct 2023 08:09:11 +0900 Subject: [PATCH] fix crossScalaVersions. enable Scala 3 build --- build.sbt | 8 ++++---- .../provider/OAuth2ProviderActionBuildersSpec.scala | 5 +++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/build.sbt b/build.sbt index 87cc409..d84f6ea 100644 --- a/build.sbt +++ b/build.sbt @@ -5,14 +5,14 @@ val commonDependenciesInTestScope = Seq( ) def unusedWarnings(scalaVersion: String) = - Seq("-Ywarn-unused:-imports,_") + Seq("-Wunused:imports") lazy val scalaOAuth2ProviderSettings = Defaults.coreDefaultSettings ++ Seq( organization := "com.nulab-inc", - scalaVersion := "3.3.0", - crossScalaVersions := Seq("2.13.12"), + scalaVersion := "3.3.1", + crossScalaVersions ++= Seq("2.13.12"), scalacOptions ++= Seq("-deprecation", "-unchecked", "-feature"), scalacOptions ++= unusedWarnings(scalaVersion.value), publishTo := { @@ -57,7 +57,7 @@ lazy val root = (project in file(".")) description := "Support scala-oauth2-core library on Play Framework Scala", version := "1.5.1-SNAPSHOT", libraryDependencies ++= Seq( - "com.nulab-inc" %% "scala-oauth2-core" % "1.5.0" % "provided", + "com.nulab-inc" %% "scala-oauth2-core" % "1.6.0" % "provided", "com.typesafe.play" %% "play" % playVersion % "provided", "com.typesafe.play" %% "play-test" % playVersion % "test" ) ++ commonDependenciesInTestScope diff --git a/src/test/scala/scalaoauth2/provider/OAuth2ProviderActionBuildersSpec.scala b/src/test/scala/scalaoauth2/provider/OAuth2ProviderActionBuildersSpec.scala index 18071d8..5642863 100644 --- a/src/test/scala/scalaoauth2/provider/OAuth2ProviderActionBuildersSpec.scala +++ b/src/test/scala/scalaoauth2/provider/OAuth2ProviderActionBuildersSpec.scala @@ -5,6 +5,7 @@ import org.scalatest.matchers.should.Matchers._ import play.api.mvc.{AbstractController, ControllerComponents} import play.api.test.Helpers._ import play.api.test.{FakeRequest, _} +import scala.concurrent.Future import javax.inject.Inject @@ -14,8 +15,8 @@ class OAuth2ProviderActionBuildersSpec extends AnyFlatSpec { extends AbstractController(components) with OAuth2ProviderActionBuilders { - val action = AuthorizedAction(new MockDataHandler) { request => - Ok(request.authInfo.user.name) + val action = AuthorizedAction(new MockDataHandler).async { request => + Future.successful(Ok(request.authInfo.user.name)) } }