Skip to content

Migrate from legacy OSSRH to Sonatype Central Portal#11

Merged
johnsonlee merged 1 commit intomainfrom
migrate-to-central-portal
Feb 4, 2026
Merged

Migrate from legacy OSSRH to Sonatype Central Portal#11
johnsonlee merged 1 commit intomainfrom
migrate-to-central-portal

Conversation

@johnsonlee
Copy link
Owner

Summary

  • Replace deprecated de.marcphilipp.nexus-publish:0.4.0 and io.codearte.nexus-staging:0.22.0 with unified io.github.gradle-nexus.publish-plugin:2.0.0
  • Update all endpoints from defunct oss.sonatype.org to Central Portal compatibility layer (ossrh-staging-api.central.sonatype.com)
  • Add snapshot repository URL support (central.sonatype.com/repository/maven-snapshots)
  • Merge configureNexusStaging() + configureNexusPublish() into single unified function
  • Update minimum Gradle version from 6.2 to 7.4+ and add Gradle 8.x functional tests

Context

Legacy OSSRH (oss.sonatype.org) was shut down on June 30, 2025. All publishing must now go through the Sonatype Central Portal. This PR uses the OSSRH Staging API compatibility layer provided by Sonatype, which allows existing Nexus staging workflows to continue working with minimal changes.

Note: Users must generate new tokens at central.sonatype.com — old OSSRH credentials no longer work.

Test plan

  • compileKotlin passes
  • Unit tests pass
  • Verify publishToMavenLocal works with Gradle 7.4+
  • Verify publishToSonatype + closeAndReleaseSonatypeStagingRepository works with Central Portal tokens

🤖 Generated with Claude Code

The legacy OSSRH (oss.sonatype.org) was shut down on June 30, 2025.
This migrates the plugin to use the Central Portal OSSRH Staging API
compatibility layer and replaces the two deprecated plugins with
the modern unified successor.

- Replace de.marcphilipp.nexus-publish:0.4.0 and
  io.codearte.nexus-staging:0.22.0 with
  io.github.gradle-nexus.publish-plugin:2.0.0
- Update default server URL to
  ossrh-staging-api.central.sonatype.com
- Add snapshot URL support for
  central.sonatype.com/repository/maven-snapshots
- Merge configureNexusStaging + configureNexusPublish into
  a single unified configureNexusPublish function
- Update minimum supported Gradle version to 7.4+
- Add Gradle 8.x functional tests

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@johnsonlee johnsonlee merged commit f6b0fc0 into main Feb 4, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant