From 6663ca34ea9bda2dd9b0c8a5977407ddc8de1c44 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Tue, 23 Apr 2024 20:13:51 +0000 Subject: [PATCH] Update scala-library, scala-reflect to 2.13.13 --- .github/workflows/scala.yml | 2 +- build.sbt | 76 ++++++++++++++++++++++++++----------- 2 files changed, 55 insertions(+), 23 deletions(-) diff --git a/.github/workflows/scala.yml b/.github/workflows/scala.yml index 6abcf88b..b4169dee 100644 --- a/.github/workflows/scala.yml +++ b/.github/workflows/scala.yml @@ -13,7 +13,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest] - scala: [2.12.19, 2.13.12, 3.3.0] + scala: [2.12.19, 2.13.13, 3.3.0] steps: - uses: actions/checkout@v3 diff --git a/build.sbt b/build.sbt index ae0b6df5..f2e832b7 100644 --- a/build.sbt +++ b/build.sbt @@ -1,5 +1,5 @@ lazy val scala212 = "2.12.19" -lazy val scala213 = "2.13.12" +lazy val scala213 = "2.13.13" /* FIXME Return to use a stable version when 'scala.quoted.Quotes.reflectModuleSymbol.newClass' and 'scala.quoted.Quotes.reflectModule.ClassDef.apply' are no longer experimental methods @@ -11,7 +11,9 @@ ThisBuild / scalaVersion := scala3 lazy val commonSettings = Seq( version := "0.28.4", organization := "com.tethys-json", - licenses := Seq("Apache-2.0" -> url("https://www.apache.org/licenses/LICENSE-2.0")), + licenses := Seq( + "Apache-2.0" -> url("https://www.apache.org/licenses/LICENSE-2.0") + ), homepage := Some(url("https://github.com/tethys-json/tethys")), scmInfo := Some( ScmInfo( @@ -39,7 +41,9 @@ lazy val commonSettings = Seq( url = url("https://github.com/MrIrre") ) ), - credentials ++= Option(Path.userHome / ".config" / "sbt" / ".tethys-credentials") + credentials ++= Option( + Path.userHome / ".config" / "sbt" / ".tethys-credentials" + ) .filter(_.exists()) .map(Credentials(_)), publishMavenStyle := true, @@ -55,7 +59,8 @@ lazy val commonSettings = Seq( def crossScalaSettings = { def addDirsByScalaVersion(path: String): Def.Initialize[Seq[sbt.File]] = scalaVersion.zip(baseDirectory) { case (v, base) => - def extraDirs(versionSpecificFolder: String): Seq[sbt.File] = Seq(base / path / versionSpecificFolder) + def extraDirs(versionSpecificFolder: String): Seq[sbt.File] = + Seq(base / path / versionSpecificFolder) CrossVersion.partialVersion(v) match { case Some((2, y)) if y >= 13 => @@ -68,8 +73,12 @@ def crossScalaSettings = { Seq( crossScalaVersions := Seq(scala212, scala213, scala3), - Compile / unmanagedSourceDirectories ++= addDirsByScalaVersion("src/main").value, - Test / unmanagedSourceDirectories ++= addDirsByScalaVersion("src/test").value + Compile / unmanagedSourceDirectories ++= addDirsByScalaVersion( + "src/main" + ).value, + Test / unmanagedSourceDirectories ++= addDirsByScalaVersion( + "src/test" + ).value ) } @@ -80,13 +89,25 @@ lazy val testSettings = Seq( ) ) -lazy val tethys = project.in(file(".")) +lazy val tethys = project + .in(file(".")) .settings( publishTo := None, crossScalaVersions := Seq.empty, commonSettings ) - .aggregate(core, `macro-derivation`, `jackson-211`, `jackson-212`, `jackson-213`, json4s, circe, refined, enumeratum, cats) + .aggregate( + core, + `macro-derivation`, + `jackson-211`, + `jackson-212`, + `jackson-213`, + json4s, + circe, + refined, + enumeratum, + cats + ) lazy val modules = file("modules") @@ -97,7 +118,8 @@ def addScalaReflect(scalaVersion: String): Seq[ModuleID] = case _ => Seq.empty } -lazy val core = project.in(modules / "core") +lazy val core = project + .in(modules / "core") .settings(crossScalaSettings) .settings(commonSettings) .settings(testSettings) @@ -106,19 +128,21 @@ lazy val core = project.in(modules / "core") libraryDependencies ++= addScalaReflect(scalaVersion.value) ) -lazy val cats = project.in(modules / "cats") +lazy val cats = project + .in(modules / "cats") .settings(crossScalaSettings) .settings(commonSettings) .settings(testSettings) .settings( name := "tethys-cats", libraryDependencies ++= Seq( - "org.typelevel" %% "cats-core" % "2.10.0", + "org.typelevel" %% "cats-core" % "2.10.0" ) ) .dependsOn(core) -lazy val `macro-derivation` = project.in(modules / "macro-derivation") +lazy val `macro-derivation` = project + .in(modules / "macro-derivation") .settings(crossScalaSettings) .settings(commonSettings) .settings(testSettings) @@ -134,7 +158,8 @@ lazy val jacksonSettings = Seq( Test / unmanagedResourceDirectories += modules / "jackson-backend" / "src" / "test" / "resources" ) -lazy val `jackson-211` = project.in(modules / "jackson-211") +lazy val `jackson-211` = project + .in(modules / "jackson-211") .settings(crossScalaSettings) .settings(commonSettings) .settings(jacksonSettings) @@ -147,7 +172,8 @@ lazy val `jackson-211` = project.in(modules / "jackson-211") ) .dependsOn(core) -lazy val `jackson-212` = project.in(modules / "jackson-212") +lazy val `jackson-212` = project + .in(modules / "jackson-212") .settings(crossScalaSettings) .settings(commonSettings) .settings(jacksonSettings) @@ -160,7 +186,8 @@ lazy val `jackson-212` = project.in(modules / "jackson-212") ) .dependsOn(core) -lazy val `jackson-213` = project.in(modules / "jackson-213") +lazy val `jackson-213` = project + .in(modules / "jackson-213") .settings(crossScalaSettings) .settings(commonSettings) .settings(jacksonSettings) @@ -173,7 +200,8 @@ lazy val `jackson-213` = project.in(modules / "jackson-213") ) .dependsOn(core) -lazy val circe = project.in(modules / "circe") +lazy val circe = project + .in(modules / "circe") .settings(crossScalaSettings) .settings(commonSettings) .settings(testSettings) @@ -185,7 +213,8 @@ lazy val circe = project.in(modules / "circe") ) .dependsOn(core, `jackson-212` % Test) -lazy val json4s = project.in(modules / "json4s") +lazy val json4s = project + .in(modules / "json4s") .settings(crossScalaSettings) .settings(commonSettings) .settings(testSettings) @@ -197,7 +226,8 @@ lazy val json4s = project.in(modules / "json4s") ) .dependsOn(core) -lazy val enumeratum = project.in(modules / "enumeratum") +lazy val enumeratum = project + .in(modules / "enumeratum") .settings(crossScalaSettings) .settings(commonSettings) .settings(testSettings) @@ -213,7 +243,8 @@ lazy val enumeratum = project.in(modules / "enumeratum") ) .dependsOn(core) -lazy val refined = project.in(modules / "refined") +lazy val refined = project + .in(modules / "refined") .settings(crossScalaSettings) .settings(commonSettings) .settings(testSettings) @@ -225,7 +256,8 @@ lazy val refined = project.in(modules / "refined") ) .dependsOn(core) -lazy val benchmarks = project.in(modules / "benchmarks") +lazy val benchmarks = project + .in(modules / "benchmarks") .settings(crossScalaSettings) .settings(commonSettings) .settings( @@ -239,12 +271,12 @@ lazy val benchmarks = project.in(modules / "benchmarks") "io.circe" %% "circe-jawn" % "0.14.3", "io.circe" %% "circe-jackson210" % "0.14.0", "com.typesafe.play" %% "play-json" % "2.10.0-RC7", - "org.knowm.xchart" % "xchart" % "3.8.2" exclude("de.erichseifert.vectorgraphics2d", "VectorGraphics2D") withSources() + "org.knowm.xchart" % "xchart" % "3.8.2" exclude ("de.erichseifert.vectorgraphics2d", "VectorGraphics2D") withSources () ), scalacOptions ++= { CrossVersion.partialVersion(scalaVersion.value) match { case Some((2, 13)) => Seq("-Ymacro-annotations") - case _ => Seq.empty + case _ => Seq.empty } } )