From d89c52adf71c32df4a58ee4ced61197da1a4190f Mon Sep 17 00:00:00 2001 From: zainab-ali Date: Mon, 13 Jul 2026 15:07:07 +0100 Subject: [PATCH] Replace sbt-gpg with sbt-pgp --- ci-signing/build.sbt | 2 +- .../org/typelevel/sbt/TypelevelCiSigningPlugin.scala | 11 ++++------- docs/customization.md | 4 ++-- docs/plugins.dot | 4 ++-- .../org/typelevel/sbt/TypelevelKernelPlugin.scala | 2 +- sonatype/build.sbt | 1 + .../org/typelevel/sbt/TypelevelSonatypePlugin.scala | 2 +- 7 files changed, 12 insertions(+), 14 deletions(-) diff --git a/ci-signing/build.sbt b/ci-signing/build.sbt index 231214fd..267a6dd6 100644 --- a/ci-signing/build.sbt +++ b/ci-signing/build.sbt @@ -1 +1 @@ -addSbtPlugin("io.crashbox" % "sbt-gpg" % "0.2.1") +addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.3.1") diff --git a/ci-signing/src/main/scala/org/typelevel/sbt/TypelevelCiSigningPlugin.scala b/ci-signing/src/main/scala/org/typelevel/sbt/TypelevelCiSigningPlugin.scala index 6d222ec2..4dcfad43 100644 --- a/ci-signing/src/main/scala/org/typelevel/sbt/TypelevelCiSigningPlugin.scala +++ b/ci-signing/src/main/scala/org/typelevel/sbt/TypelevelCiSigningPlugin.scala @@ -16,17 +16,16 @@ package org.typelevel.sbt -import io.crashbox.gpg.SbtGpg +import com.jsuereth.sbtpgp.SbtPgp +import com.jsuereth.sbtpgp.SbtPgp.autoImport.useGpgAgent import org.typelevel.sbt.gha.GenerativePlugin import org.typelevel.sbt.gha.GenerativePlugin.autoImport._ import org.typelevel.sbt.gha.GitHubActionsPlugin import sbt._ -import Keys._ - object TypelevelCiSigningPlugin extends AutoPlugin { - override def requires = SbtGpg && GitHubActionsPlugin && GenerativePlugin + override def requires = SbtPgp && GitHubActionsPlugin && GenerativePlugin override def trigger = allRequirements @@ -55,10 +54,8 @@ object TypelevelCiSigningPlugin extends AutoPlugin { ) ) - import SbtGpg.autoImport._ - override def projectSettings = Seq( - gpgWarnOnFailure := isSnapshot.value + useGpgAgent := false ) private val env = Map( diff --git a/docs/customization.md b/docs/customization.md index 3691fb25..26d2eefb 100644 --- a/docs/customization.md +++ b/docs/customization.md @@ -14,7 +14,7 @@ Instead of using the super-plugins, for finer-grained control you can always add - `tlIsScala3` (setting): `true`, if `scalaVersion` is 3.x. - `tlCommandAliases` (setting): Command aliases defined for this build. -- `tlReleaseLocal` (command): Alias for `+publishLocal`. +- `tlReleaseLocal` (command): Alias for `+publishLocalSigned`. ### sbt-typelevel-versioning `TypelevelVersioningPlugin`: Establishes a git-based, early semantic versioning scheme. @@ -31,7 +31,7 @@ Instead of using the super-plugins, for finer-grained control you can always add ### sbt-typelevel-sonatype `TypelevelSonatypePlugin`: Sets up publishing to Sonatype/Maven. -- `tlRelease` (command): Check binary-compatibility and `+publish` to Sonatype. +- `tlRelease` (command): Check binary-compatibility and `+publishSigned` to Sonatype. `TypelevelUnidocPlugin`: Sets up publishing a Scaladoc-only artifact to Sonatype/Maven. diff --git a/docs/plugins.dot b/docs/plugins.dot index 9ac62373..968155ff 100644 --- a/docs/plugins.dot +++ b/docs/plugins.dot @@ -4,7 +4,7 @@ digraph { fix[label="sbt-scalafix"] fmt[label="sbt-scalafmt"] git[label="sbt-git"] - gpg[label="sbt-gpg"] + pgp[label="sbt-pgp"] header[label="sbt-header"] laika[label="laika-sbt"] mdoc[label="sbt-mdoc"] @@ -47,7 +47,7 @@ digraph { tlcisigning[label="sbt-typelevel-ci-signing"]; tlcisigning -> tlgha; - tlcisigning -> gpg; + tlcisigning -> pgp; tlsonatypecirelease[label="sbt-typelevel-sonatype-ci-release"]; tlsonatypecirelease -> tlsonatype; diff --git a/kernel/src/main/scala/org/typelevel/sbt/TypelevelKernelPlugin.scala b/kernel/src/main/scala/org/typelevel/sbt/TypelevelKernelPlugin.scala index 5f55abe2..7409da2b 100644 --- a/kernel/src/main/scala/org/typelevel/sbt/TypelevelKernelPlugin.scala +++ b/kernel/src/main/scala/org/typelevel/sbt/TypelevelKernelPlugin.scala @@ -62,7 +62,7 @@ object TypelevelKernelPlugin extends AutoPlugin { override def globalSettings = Seq( Def.derive(tlIsScala3 := scalaVersion.value.startsWith("3.")), tlCommandAliases := Map( - "tlReleaseLocal" -> List("reload", "project /", "+publishLocal") + "tlReleaseLocal" -> List("reload", "project /", "+publishLocalSigned") ), onLoad := { val aliases = tlCommandAliases.value diff --git a/sonatype/build.sbt b/sonatype/build.sbt index 86eab2d9..6fc82320 100644 --- a/sonatype/build.sbt +++ b/sonatype/build.sbt @@ -1,2 +1,3 @@ addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.1.6") addSbtPlugin("com.github.sbt" % "sbt-unidoc" % "0.6.1") +addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.3.1") diff --git a/sonatype/src/main/scala/org/typelevel/sbt/TypelevelSonatypePlugin.scala b/sonatype/src/main/scala/org/typelevel/sbt/TypelevelSonatypePlugin.scala index 4a2b838e..dbbea30a 100644 --- a/sonatype/src/main/scala/org/typelevel/sbt/TypelevelSonatypePlugin.scala +++ b/sonatype/src/main/scala/org/typelevel/sbt/TypelevelSonatypePlugin.scala @@ -36,7 +36,7 @@ object TypelevelSonatypePlugin extends AutoPlugin { "reload", "project /", "+mimaReportBinaryIssues", - "+publish", + "+publishSigned", "tlSonatypeBundleReleaseIfRelevant") } )