diff --git a/CLAUDE.md b/CLAUDE.md index 60f2f88..622b193 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -107,6 +107,27 @@ The project uses Docker-based cross-compilation toolchains (see `docker/` direct - Run tests before creating PR: `./sbt test` - Format code: `./sbt scalafmtAll` +### Release Process +The project uses sbt's built-in Sonatype integration for publishing: + +```bash +# 1. Stage artifacts to Sonatype +./sbt publishSigned + +# 2. Release to Maven Central +./sbt sonaRelease +``` + +**Prerequisites:** +- Set up Sonatype credentials in `~/.sbt/1.0/sonatype.sbt`: + ```scala + credentials += Credentials("Sonatype Nexus Repository Manager", + "s01.oss.sonatype.org", + "", + "") + ``` +- Configure PGP signing for artifact signing + ### Common Development Tasks - When making changes to native code, rebuild with `make clean-native native` - For Java/Scala changes, use `./sbt ~test` for continuous testing diff --git a/build.sbt b/build.sbt index 4e3ab52..fa62a9c 100644 --- a/build.sbt +++ b/build.sbt @@ -5,8 +5,11 @@ organization := "org.xerial.snappy" organizationName := "xerial.org" description := "snappy-java: A fast compression/decompression library" -sonatypeProfileName := "org.xerial" -ThisBuild / publishTo := sonatypePublishToBundle.value +ThisBuild / publishTo := { + val nexus = "https://s01.oss.sonatype.org/" + if (isSnapshot.value) Some("snapshots" at nexus + "content/repositories/snapshots") + else Some("releases" at nexus + "service/local/staging/deploy/maven2") +} licenses := Seq("Apache-2.0" -> url("https://www.apache.org/licenses/LICENSE-2.0.html")) homepage := Some(url("https://github.com/xerial/snappy-java")) scmInfo := Some( diff --git a/project/build.properties b/project/build.properties index fa5667a..138bc7a 100755 --- a/project/build.properties +++ b/project/build.properties @@ -1,2 +1,2 @@ -sbt.version=1.10.11 +sbt.version=1.11.3 diff --git a/project/plugins.sbt b/project/plugins.sbt index 6dcc73c..38b57e6 100755 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,4 +1,3 @@ -addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.12.2") addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.3.1") addSbtPlugin("com.github.sbt" % "sbt-osgi" % "0.10.0") addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.5")