From 7d27b3873dcc1b4eca5210fcf09a61d1beb50dc6 Mon Sep 17 00:00:00 2001 From: Domas Poliakas Date: Mon, 5 Oct 2026 16:57:01 +0200 Subject: [PATCH 1/3] Drop scala 2.12, add scala 3 --- .github/workflows/ci.yml | 2 +- build.sbt | 56 ++++++++++++++++++++++---------------- project/Dependencies.scala | 49 ++++++++++++++++++--------------- project/plugins.sbt | 22 +++++++-------- 4 files changed, 71 insertions(+), 58 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4a038b3a..31ae9b5f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,7 +22,7 @@ jobs: strategy: matrix: os: [ubuntu-latest] - scala: [2.12.14, 2.13.16] + scala: [2.13.16, 3.3.6] java: [corretto@17] runs-on: ${{ matrix.os }} steps: diff --git a/build.sbt b/build.sbt index 9d2866c7..14b7545a 100644 --- a/build.sbt +++ b/build.sbt @@ -2,21 +2,27 @@ import xerial.sbt.Sonatype.GitHubHosting import ReleaseTransformations._ import microsites.CdnDirectives -lazy val scala212 = "2.12.14" -lazy val scala213 = "2.13.16" -lazy val supportedScalaVersions = List(scala212, scala213) +lazy val scala213 = "2.13.16" +lazy val scala3 = "3.3.6" +lazy val supportedScalaVersions = List(scala213, scala3) -ThisBuild / scalaVersion := scala213 -ThisBuild / organization := "com.precog" -ThisBuild / homepage := Some(url("https://kirill5k.github.io/mongo4cats")) -ThisBuild / scmInfo := Some(ScmInfo(url("https://github.com/precog/mongo4cats"), "git@github.com:precog/mongo4cats.git")) -ThisBuild / developers := List(Developer("kirill5k", "Kirill", "immotional@aol.com", url("https://github.com/kirill5k"))) -ThisBuild / licenses := List("Apache-2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0")) -ThisBuild / sonatypeProjectHosting := Some(GitHubHosting("precog", "mongo4cats", "bot@precog.com")) -ThisBuild / publishTo := sonatypePublishToBundle.value +ThisBuild / scalaVersion := scala213 +ThisBuild / organization := "com.precog" +ThisBuild / homepage := Some(url("https://kirill5k.github.io/mongo4cats")) +ThisBuild / scmInfo := Some( + ScmInfo(url("https://github.com/precog/mongo4cats"), "git@github.com:precog/mongo4cats.git") +) +ThisBuild / developers := List( + Developer("kirill5k", "Kirill", "immotional@aol.com", url("https://github.com/kirill5k")) +) +ThisBuild / licenses := List("Apache-2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0")) +ThisBuild / sonatypeProjectHosting := Some( + GitHubHosting("precog", "mongo4cats", "bot@precog.com") +) +ThisBuild / publishTo := sonatypePublishToBundle.value ThisBuild / githubWorkflowPublishTargetBranches := Nil -ThisBuild / githubWorkflowScalaVersions := supportedScalaVersions -ThisBuild / githubWorkflowJavaVersions := Seq(JavaSpec(JavaSpec.Distribution.Corretto, "17")) +ThisBuild / githubWorkflowScalaVersions := supportedScalaVersions +ThisBuild / githubWorkflowJavaVersions := Seq(JavaSpec(JavaSpec.Distribution.Corretto, "17")) ThisBuild / githubOwner := "precog" ThisBuild / githubRepository := "mongo4cats" @@ -36,19 +42,19 @@ releaseProcess := Seq[ReleaseStep]( ) lazy val noPublish = Seq( - publish := {}, - publishLocal := {}, + publish := {}, + publishLocal := {}, publishArtifact := false, - publish / skip := true + publish / skip := true ) lazy val commonSettings = Seq( organizationName := "MongoDB Java client wrapper for Cats-Effect & FS2", - startYear := Some(2020), + startYear := Some(2020), licenses += ("Apache-2.0", new URI("https://www.apache.org/licenses/LICENSE-2.0.txt").toURL), headerLicense := Some(HeaderLicense.ALv2("2020", "Kirill5k")), resolvers += "Apache public" at "https://repository.apache.org/content/groups/public/", - scalafmtOnCompile := true, + scalafmtOnCompile := true, crossScalaVersions := supportedScalaVersions, Compile / doc / scalacOptions ++= Seq( "-no-link-warnings" // Suppresses problems with Scaladoc links @@ -59,7 +65,7 @@ lazy val root = project .in(file(".")) .settings(noPublish) .settings( - name := "mongo4cats", + name := "mongo4cats", crossScalaVersions := Nil ) .aggregate( @@ -77,7 +83,8 @@ lazy val bson = project .settings( name := "mongo4cats-bson", libraryDependencies ++= Dependencies.bson ++ Dependencies.test, - test / parallelExecution := false) + test / parallelExecution := false + ) .enablePlugins(AutomateHeaderPlugin) lazy val core = project @@ -87,7 +94,8 @@ lazy val core = project .settings( name := "mongo4cats-core", libraryDependencies ++= Dependencies.core ++ Dependencies.test, - test / parallelExecution := false) + test / parallelExecution := false + ) .enablePlugins(AutomateHeaderPlugin) lazy val circe = project @@ -98,7 +106,7 @@ lazy val circe = project name := "mongo4cats-circe", libraryDependencies ++= Dependencies.circe ++ Dependencies.test, test / parallelExecution := false, - mimaPreviousArtifacts := Set(organization.value %% moduleName.value % "0.4.1") + mimaPreviousArtifacts := Set(organization.value %% moduleName.value % "0.4.1") ) .enablePlugins(AutomateHeaderPlugin) @@ -120,7 +128,7 @@ lazy val embedded = project name := "mongo4cats-embedded", libraryDependencies ++= Dependencies.embedded, test / parallelExecution := false, - mimaPreviousArtifacts := Set(organization.value %% moduleName.value % "0.4.1") + mimaPreviousArtifacts := Set(organization.value %% moduleName.value % "0.4.1") ) .enablePlugins(AutomateHeaderPlugin) @@ -129,7 +137,7 @@ lazy val testkit = project .settings(commonSettings) .settings( name := "mongo4cats-testkit", - libraryDependencies ++= Dependencies.testkit, + libraryDependencies ++= Dependencies.testkit ) .dependsOn(core) .enablePlugins(AutomateHeaderPlugin) diff --git a/project/Dependencies.scala b/project/Dependencies.scala index e8285a07..c4e438dd 100644 --- a/project/Dependencies.scala +++ b/project/Dependencies.scala @@ -2,47 +2,52 @@ import sbt._ object Dependencies { private object Versions { - val mongodb = "4.11.1" - val fs2 = "3.11.0" + val mongodb = "4.11.1" + val fs2 = "3.11.0" val scalaCompat = "2.6.0" - val circe = "0.14.6" + val circe = "0.14.6" val findbugsJsr305Version = "1.3.9" val cats = "2.11.0" - val logback = "1.2.10" + val logback = "1.2.10" val scalaTest = "3.2.10" val testContainers = "0.40.10" - val embeddedMongo = "4.20.0" - val immutableValue = "2.8.8" + val embeddedMongo = "4.33.0" + val immutableValue = "2.8.8" val commonsCompress = "1.21" } private object Libraries { - val mongodbBson = "org.mongodb" % "bson" % Versions.mongodb - val mongodbDriverCore = "org.mongodb" % "mongodb-driver-core" % Versions.mongodb - val mongodbDriverStreams = "org.mongodb" % "mongodb-driver-reactivestreams" % Versions.mongodb - val mongodbDriverSync = "org.mongodb" % "mongodb-driver-sync" % Versions.mongodb - val findbugsJsr305Version = "com.google.code.findbugs" % "jsr305" % Versions.findbugsJsr305Version % Provided + val mongodbBson = "org.mongodb" % "bson" % Versions.mongodb + val mongodbDriverCore = "org.mongodb" % "mongodb-driver-core" % Versions.mongodb + val mongodbDriverStreams = + "org.mongodb" % "mongodb-driver-reactivestreams" % Versions.mongodb + val mongodbDriverSync = "org.mongodb" % "mongodb-driver-sync" % Versions.mongodb + val findbugsJsr305Version = + "com.google.code.findbugs" % "jsr305" % Versions.findbugsJsr305Version % Provided val catsCore = "org.typelevel" %% "cats-core" % Versions.cats - val fs2Core = "co.fs2" %% "fs2-core" % Versions.fs2 - val scalaCompat = "org.scala-lang.modules" %% "scala-collection-compat" % Versions.scalaCompat + val fs2Core = "co.fs2" %% "fs2-core" % Versions.fs2 + val scalaCompat = + "org.scala-lang.modules" %% "scala-collection-compat" % Versions.scalaCompat - val circeCore = "io.circe" %% "circe-core" % Versions.circe - val circeParser = "io.circe" %% "circe-parser" % Versions.circe + val circeCore = "io.circe" %% "circe-core" % Versions.circe + val circeParser = "io.circe" %% "circe-parser" % Versions.circe val circeGeneric = "io.circe" %% "circe-generic" % Versions.circe - val scalaTest = "org.scalatest" %% "scalatest" % Versions.scalaTest - val logback = "ch.qos.logback" % "logback-classic" % Versions.logback + val scalaTest = "org.scalatest" %% "scalatest" % Versions.scalaTest + val logback = "ch.qos.logback" % "logback-classic" % Versions.logback - val testContainersMongodb = "com.dimafeng" %% "testcontainers-scala-mongodb" % Versions.testContainers + val testContainersMongodb = + "com.dimafeng" %% "testcontainers-scala-mongodb" % Versions.testContainers - val embeddedMongo = "de.flapdoodle.embed" % "de.flapdoodle.embed.mongo" % Versions.embeddedMongo - val immutableValue = "org.immutables" % "value" % Versions.immutableValue - val commonsCompress = "org.apache.commons" % "commons-compress" % Versions.commonsCompress + val embeddedMongo = + "de.flapdoodle.embed" % "de.flapdoodle.embed.mongo" % Versions.embeddedMongo + val immutableValue = "org.immutables" % "value" % Versions.immutableValue + val commonsCompress = "org.apache.commons" % "commons-compress" % Versions.commonsCompress } @@ -62,7 +67,7 @@ object Dependencies { ) lazy val test = Seq( - Libraries.logback % Test, + Libraries.logback % Test, Libraries.scalaTest % Test ) diff --git a/project/plugins.sbt b/project/plugins.sbt index ed4a1a53..5f59b3e9 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,11 +1,11 @@ -addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.1.16") -addSbtPlugin("com.github.sbt" % "sbt-release" % "1.0.15") -addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.3") -addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.6.0") -addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.7") -addSbtPlugin("com.jsuereth" % "sbt-pgp" % "2.0.1") -addSbtPlugin("com.timushev.sbt" % "sbt-updates" % "0.5.3") -addSbtPlugin("com.47deg" % "sbt-microsites" % "1.3.4") -addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.0.1") -addSbtPlugin("com.github.sbt" % "sbt-github-actions" % "0.24.0") -addSbtPlugin("com.codecommit" % "sbt-github-packages" % "0.5.3") +addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.1.16") +addSbtPlugin("com.github.sbt" % "sbt-release" % "1.0.15") +addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.3") +addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.6.0") +addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.7") +addSbtPlugin("com.jsuereth" % "sbt-pgp" % "2.0.1") +addSbtPlugin("com.timushev.sbt" % "sbt-updates" % "0.5.3") +addSbtPlugin("com.47deg" % "sbt-microsites" % "1.3.4") +addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.0.1") +addSbtPlugin("com.github.sbt" % "sbt-github-actions" % "0.24.0") +addSbtPlugin("com.codecommit" % "sbt-github-packages" % "0.5.3") From f6530766be2facf7c5a19f31269ac9959cc09d77 Mon Sep 17 00:00:00 2001 From: Domas Poliakas Date: Mon, 5 Oct 2026 16:58:48 +0200 Subject: [PATCH 2/3] Scala 3.3.8 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 14b7545a..0bdc2c82 100644 --- a/build.sbt +++ b/build.sbt @@ -3,7 +3,7 @@ import ReleaseTransformations._ import microsites.CdnDirectives lazy val scala213 = "2.13.16" -lazy val scala3 = "3.3.6" +lazy val scala3 = "3.3.8" lazy val supportedScalaVersions = List(scala213, scala3) ThisBuild / scalaVersion := scala213 From 1c302597b25a448408c8f564632d4318ac4be193 Mon Sep 17 00:00:00 2001 From: Domas Poliakas Date: Mon, 19 Oct 2026 15:34:48 +0200 Subject: [PATCH 3/3] Regen CI --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 31ae9b5f..c5f9e95d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,7 +22,7 @@ jobs: strategy: matrix: os: [ubuntu-latest] - scala: [2.13.16, 3.3.6] + scala: [2.13.16, 3.3.8] java: [corretto@17] runs-on: ${{ matrix.os }} steps: