diff --git a/.ci_scripts/validate.sh b/.ci_scripts/validate.sh index 9d50d96..0482e0f 100755 --- a/.ci_scripts/validate.sh +++ b/.ci_scripts/validate.sh @@ -30,7 +30,7 @@ EOF export JVM_OPTS -TEST_ARGS=";error ;test:compile ;mimaReportBinaryIssues " +TEST_ARGS=";error ;Test/compile ;mimaReportBinaryIssues " TEST_ARGS="$TEST_ARGS ;warn ;testOnly ;doc" sbt ++$SCALA_VERSION "$TEST_ARGS" diff --git a/.circleci/config.yml b/.circleci/config.yml index d3fdcde..807ad78 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -6,7 +6,7 @@ commands: parameters: sbt_version: type: string - default: "1.11.4" + default: "2.0.1" steps: - restore_cache: keys: @@ -150,7 +150,7 @@ commands: jobs: scala211_akka24: docker: - - image: circleci/openjdk:8-jdk + - image: cimg/openjdk:26.0 working_directory: ~/repo @@ -171,7 +171,7 @@ jobs: scala212_akka25: docker: - - image: circleci/openjdk:8-jdk + - image: cimg/openjdk:26.0 working_directory: ~/repo @@ -191,7 +191,7 @@ jobs: scala213_akka26: docker: - - image: circleci/openjdk:8-jdk + - image: cimg/openjdk:26.0 working_directory: ~/repo @@ -218,7 +218,7 @@ jobs: environment: AKKA_VERSION: 2.6.21 ITERATEES_VERSION: no - SCALA_VERSION: 3.8.3 + SCALA_VERSION: 3.8.4 steps: - checkout @@ -231,7 +231,7 @@ jobs: publish_snapshots: docker: - - image: circleci/openjdk:8-jdk + - image: cimg/openjdk:26.0 working_directory: ~/repo @@ -243,7 +243,7 @@ jobs: keys: - &snapshot_cache_key scala-{{ .Environment.CIRCLE_JOB }}-{{ checksum "build.sbt" }}-{{ checksum "project/Common.scala" }} - - deploy: + - run: name: Publish artifacts to Sonatype Snapshots command: | if [ ! "${CIRCLE_BRANCH}" = "master" ]; then @@ -251,14 +251,11 @@ jobs: exit 0 fi - V=`sbt -Dsbt.log.noformat=true ';project akka-stream ;show version' | tail -n 1 | sed -e 's/^.* //g'` - - echo "Static version: $V" + V=$(sbt --server 'show version' 2>&1 | sed 's/\x1b\[0[Jm]//g' | grep --color=never '[0-9]\+\.[0-9]\+' | tail -1 | sed 's/\[info\]//' | xargs | tr -cd '[:alnum:]._-') - if [ `echo "$V" | grep -- '-SNAPSHOT' | wc -l` -eq 0 ]; then - S=`echo "$V" | perl -pe 's/([0-9]+)$/${\($1 + 1)}-SNAPSHOT/'` - echo "Cannot bump $V to $S" - echo "version in ThisBuild := \"$S\"" > version.sbt + if [[ "$V" != *SNAPSHOT* ]]; then + echo "Skip non snapshot: $V" + exit 0 fi export PUBLISH_REPO_NAME="Sonatype Nexus Repository Manager" diff --git a/codestyle.sbt b/codestyle.sbt index aedbf5a..29adbc9 100644 --- a/codestyle.sbt +++ b/codestyle.sbt @@ -4,7 +4,6 @@ ThisBuild / scalafmtOnCompile := true inThisBuild( List( // scalaVersion := "2.13.3", - semanticdbEnabled := true, semanticdbVersion := scalafixSemanticdb.revision ) ) diff --git a/project/Compiler.scala b/project/Compiler.scala index b7eee78..62bc59c 100644 --- a/project/Compiler.scala +++ b/project/Compiler.scala @@ -14,6 +14,7 @@ object Compiler { } lazy val settings = Seq( + semanticdbEnabled := scalaBinaryVersion.value != "2.11", Compile / unmanagedSourceDirectories ++= { unmanaged(scalaVersion.value, (Compile / sourceDirectory).value) }, @@ -28,7 +29,7 @@ object Compiler { scalacOptions ++= { val sv = scalaBinaryVersion.value - if (sv startsWith "3") { + if (sv.startsWith("3")) { Seq("-Werror") } else if (sv != "2.11") { Seq("-Xfatal-warnings") @@ -37,7 +38,7 @@ object Compiler { } }, scalacOptions ++= { - if (scalaBinaryVersion.value startsWith "2.") { + if (scalaBinaryVersion.value.startsWith("2.")) { Seq( "-Xlint", "-g:vars" diff --git a/project/Publish.scala b/project/Publish.scala index 8840208..884d5ba 100644 --- a/project/Publish.scala +++ b/project/Publish.scala @@ -35,7 +35,7 @@ object Publish { val settings = Seq( Compile / doc / scalacOptions ++= { - if (scalaBinaryVersion.value startsWith "2.") { + if (scalaBinaryVersion.value.startsWith("2.")) { Seq( /*"-diagrams", */ "-implicits", "-skip-packages", "samples") } else { Seq("-skip-by-id:samples") @@ -47,10 +47,7 @@ object Publish { publishMavenStyle := true, Test / publishArtifact := false, pomIncludeRepository := { _ => false }, - licenses := Seq( - "Apache 2.0" -> - url("http://www.apache.org/licenses/LICENSE-2.0") - ), + licenses := Seq(License.Apache2), homepage := Some(url("http://reactivemongo.org")), autoAPIMappings := true, pomExtra := ( diff --git a/project/Release.scala b/project/Release.scala index 06ec173..d7f6bbd 100644 --- a/project/Release.scala +++ b/project/Release.scala @@ -95,7 +95,7 @@ object Release { releaseCommitMessage := { val ver = (ThisBuild / version).value - if (ver endsWith "-SNAPSHOT") { + if (ver.endsWith("-SNAPSHOT")) { // Prepare the release the SNAPSHOT from master, with a release branch s"Bump $ver" } else { @@ -104,7 +104,7 @@ object Release { } }, releaseProcess := { - if (version.value endsWith "-SNAPSHOT") releaseMaster.value + if (version.value.endsWith("-SNAPSHOT")) releaseMaster.value else bumpMaster.value } ) diff --git a/project/build.properties b/project/build.properties index 4ef9292..3dbdc38 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.12.13 \ No newline at end of file +sbt.version=2.0.1 \ No newline at end of file diff --git a/project/plugins.sbt b/project/plugins.sbt index 3cf63bf..1f43ac8 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -6,13 +6,13 @@ resolvers ++= Seq( addSbtPlugin("com.github.sbt" % "sbt-unidoc" % "0.6.1") -addSbtPlugin("net.virtual-void" % "sbt-dependency-graph" % "0.10.0-RC1") +addDependencyTreePlugin -addSbtPlugin("cchantep" % "sbt-scaladoc-compiler" % "0.7-SNAPSHOT") +addSbtPlugin("cchantep" % "sbt-scaladoc-compiler" % "0.8") addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.6.1") -addSbtPlugin("cchantep" % "sbt-hl-compiler" % "0.10-SNAPSHOT") +addSbtPlugin("cchantep" % "sbt-hl-compiler" % "0.12") addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.1.6") @@ -20,4 +20,4 @@ addSbtPlugin("com.github.sbt" % "sbt-release" % "1.5.0") addSbtPlugin("com.github.sbt" % "sbt-dynver" % "5.1.1") -addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.14.6") +addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.14.7") diff --git a/version.sbt b/version.sbt index 106fe2c..ee8c125 100644 --- a/version.sbt +++ b/version.sbt @@ -20,7 +20,7 @@ ThisBuild / version := { Seq(maj, min, patch, rc) <- Stable.unapplySeq(previousVer) nextPatch <- scala.util.Try(patch.toInt).map(_ + 1).toOption nextRc = { - if (rc startsWith "-RC") { + if (rc.startsWith("-RC")) { scala.util .Try(rc.stripPrefix("-RC").toInt) .map(_ + 1)