From d58a19ae1e778da6ca7a42efb69f3112a701714e Mon Sep 17 00:00:00 2001 From: gekomad Date: Mon, 24 May 2021 10:04:42 +0200 Subject: [PATCH] scala 3 --- build.sbt | 7 +++---- project/build.properties | 2 +- project/plugins.sbt | 4 ++-- src/test/scala/Validate.scala | 15 ++++++++------- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/build.sbt b/build.sbt index 934c45a..22ad20e 100644 --- a/build.sbt +++ b/build.sbt @@ -2,12 +2,11 @@ name := "scala-regex-collection" version := "2.0.0" -scalaVersion := "3.0.0-RC2" +scalaVersion := "3.0.0" organization := "com.github.gekomad" -libraryDependencies += "org.typelevel" %% "discipline-scalatest" % "2.1.3" % Test -crossScalaVersions := Seq("2.12.8", "2.13.5", "3.0.0-RC2") +libraryDependencies += "org.typelevel" %% "discipline-scalatest" % "2.1.5" % Test -scalacOptions ++= Seq("-deprecation", "-language:postfixOps", "-feature", "-unchecked", "-Xfatal-warnings") +crossScalaVersions := Seq("2.12.8", "2.13.5", "3.0.0") publishTo := sonatypePublishTo.value diff --git a/project/build.properties b/project/build.properties index af4ff6f..1a1496c 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.5.0-RC2 +sbt.version = 1.5.2 diff --git a/project/plugins.sbt b/project/plugins.sbt index f92b67a..d918ed4 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,2 +1,2 @@ -addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "2.3") -addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.1.1") +addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.5") +addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.1.2") diff --git a/src/test/scala/Validate.scala b/src/test/scala/Validate.scala index e569b90..0808177 100644 --- a/src/test/scala/Validate.scala +++ b/src/test/scala/Validate.scala @@ -956,13 +956,14 @@ class Validate extends AnyFunSuite { import com.github.gekomad.regexcollection.Collection.Validator import scala.util.Try - implicit val validator = Validator[Foo]( - (a: String) => - Try(a.toInt) match { - case Failure(_) => None - case Success(i) => if (i % 2 == 0) Option(a) else None - } - ) + implicit val validator: Validator[Foo] = + Validator[Foo]( + (a: String) => + Try(a.toInt) match { + case Failure(_) => None + case Success(i) => if (i % 2 == 0) Option(a) else None + } + ) assert(validate[Foo]("42") == Some("42")) assert(validate[Foo]("21") == None)