Skip to content

Conversation

dpastor
Copy link
Contributor

@dpastor dpastor commented Jun 30, 2025

🎟️ Jira ticket

ANDROID-16209

πŸ₯… What's the goal?

Migrate Sonatype publishing to Central Portal following the migration guide.

🚧 How do we do it?

  • Update the Gradle Nexus Publish Plugin to version 2.0.0, which supports Central Portal.
  • Add the new nexus URLs and snapshot repository URLs under the sonatype block.
  • Replace closeAndReleaseStagingRepository with closeAndReleaseStagingRepositories, as this is required by the new plugin version for compatibility with Central Portal.

πŸ“˜ Documentation changes?

https://confluence.tid.es/pages/viewpage.action?spaceKey=CTO&title=Migration+from+OSSRH+to+Central+Portal#Updating+Open+Source+Projects

πŸ§ͺ How can I test this?

Tested snapshot generated in one of our projects compilation.

@dpastor dpastor marked this pull request as ready for review June 30, 2025 16:10
@dpastor dpastor requested review from a team, Copilot, dagonco, hjorrod and neo-sagittal and removed request for a team June 30, 2025 16:10
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR migrates the Sonatype publishing setup from OSSRH to Sonatype Central Portal by updating the Gradle Nexus Publish Plugin and adjusting CI workflows.

  • Update Gradle Nexus Publish Plugin to v2.0.0 and add Central Portal URLs
  • Change GitHub Actions to invoke closeAndReleaseStagingRepositories instead of the old task

Reviewed Changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated no comments.

File Description
publish_maven_central.gradle Added nexusUrl and snapshotRepositoryUrl for Central Portal
.github/workflows/snapshot.yml Updated publish command to include closeAndReleaseStagingRepositories
.github/workflows/release.yml Switched to closeAndReleaseStagingRepositories in release workflow
Comments suppressed due to low confidence (2)

.github/workflows/snapshot.yml:26

  • The run command is split into a quoted multiline string, which breaks YAML parsing. Use a YAML multiline block (|) or combine it into a single line (escaping newlines) so the workflow is valid.
        --max-workers 1 closeAndReleaseStagingRepositories"

.github/workflows/release.yml:23

  • This run line also uses an invalid quoted multiline string. Convert it to a YAML block (|) or ensure the entire command is on one properly quoted line.
        --max-workers 1 closeAndReleaseStagingRepositories"

@dpastor dpastor removed the request for review from neo-sagittal July 1, 2025 07:19
@dpastor dpastor requested a review from yamal-alm July 8, 2025 14:04
@dpastor dpastor merged commit ae2f99a into main Jul 8, 2025
3 checks passed
@dpastor dpastor deleted the central_portal branch July 8, 2025 15:23
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.

3 participants