diff --git a/scripts/publish-module.gradle.kts b/scripts/publish-module.gradle.kts index 2c23d30..fc2983c 100644 --- a/scripts/publish-module.gradle.kts +++ b/scripts/publish-module.gradle.kts @@ -48,9 +48,9 @@ afterEvaluate { repositories { maven { name = "OSSRH" - val releasesRepoUrl = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/" - val snapshotsRepoUrl = "https://s01.oss.sonatype.org/content/repositories/snapshots/" - url = uri(if (version.toString().endsWith("SNAPSHOT")) snapshotsRepoUrl else releasesRepoUrl) + // New Sonatype Central Portal uses unified endpoint for both releases and snapshots + val repoUrl = "https://central.sonatype.com/api/v1/publisher/upload?publishingType=AUTOMATIC" + url = uri(repoUrl) credentials { username = findProperty("ossrhUsername") as String? ?: System.getenv("OSSRH_USERNAME")