Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ jobs:
./sbt publishSigned
- name: Release to Sonatype
env:
SONATYPE_USERNAME: '${{ secrets.SONATYPE_USER }}'
SONATYPE_PASSWORD: '${{ secrets.SONATYPE_PASS }}'
run: ./sbt sonatypeBundleRelease
SONATYPE_USERNAME: '${{ secrets.SONATYPE_USERNAME }}'
SONATYPE_PASSWORD: '${{ secrets.SONATYPE_PASSWORD }}'
run: ./sbt sonaRelease
4 changes: 2 additions & 2 deletions .github/workflows/snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@ jobs:
restore-keys: ${{ runner.os }}-snapshot-
- name: Publish snapshots
env:
SONATYPE_USERNAME: '${{ secrets.SONATYPE_USER }}'
SONATYPE_PASSWORD: '${{ secrets.SONATYPE_PASS }}'
SONATYPE_USERNAME: '${{ secrets.SONATYPE_USERNAME }}'
SONATYPE_PASSWORD: '${{ secrets.SONATYPE_PASSWORD }}'
run: ./sbt publish
26 changes: 25 additions & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,31 @@ 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",
"<username>",
"<password>")
```
- 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
- Always test on multiple JDK versions if possible (8, 11, 17, 21)
- Always test on multiple JDK versions if possible (8, 11, 17, 21)

### Native Code Testing
- Use make clean-native native for testing native code
7 changes: 5 additions & 2 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -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 centralSnapshots = "https://central.sonatype.com/repository/maven-snapshots/"
if (isSnapshot.value) Some("central-snapshots" at centralSnapshots)
else localStaging.value
}
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(
Expand Down
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
sbt.version=1.10.11
sbt.version=1.11.3

1 change: 0 additions & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -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")
Expand Down
Loading