diff --git a/build.gradle b/build.gradle index 89d72cf9..65be369f 100644 --- a/build.gradle +++ b/build.gradle @@ -39,7 +39,8 @@ repositories { mavenContent { snapshotsOnly() } - url 'https://oss.sonatype.org/content/repositories/snapshots/' + // see https://central.sonatype.org/publish/publish-portal-snapshots/#consuming-via-gradle + url 'https://central.sonatype.com/repository/maven-snapshots/' } } @@ -75,7 +76,14 @@ nexusPublishing { password = "admin123" } } else { + // see https://github.com/gradle-nexus/publish-plugin#publishing-to-maven-central-via-sonatype-central + // For official documentation: + // staging repo publishing https://central.sonatype.org/publish/publish-portal-ossrh-staging-api/#configuration + // snapshot publishing https://central.sonatype.org/publish/publish-portal-snapshots/#publishing-via-other-methods sonatype { + nexusUrl.set(uri("https://ossrh-staging-api.central.sonatype.com/service/local/")) + snapshotRepositoryUrl.set(uri("https://central.sonatype.com/repository/maven-snapshots/")) + username = System.getenv("SONATYPE_USERNAME") password = System.getenv("SONATYPE_PASSWORD") }