diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a7c1e528a11..3974400fcef 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -693,6 +693,8 @@ deploy_to_sonatype: when: never - if: '$CI_COMMIT_BRANCH == "master"' when: on_success + - if: '$CI_COMMIT_BRANCH == "sarahchen6/migrate-to-central"' + when: on_success # Do not deploy release candidate versions - if: '$CI_COMMIT_TAG =~ /^v[0-9]+\.[0-9]+\.[0-9]+$/' when: on_success diff --git a/build.gradle b/build.gradle index 6a7447502b6..5e002157567 100644 --- a/build.gradle +++ b/build.gradle @@ -20,7 +20,7 @@ plugins { id "de.thetaphi.forbiddenapis" version "3.8" id 'pl.allegro.tech.build.axion-release' version '1.14.4' - id 'io.github.gradle-nexus.publish-plugin' version '1.3.0' + id 'io.github.gradle-nexus.publish-plugin' version '2.0.0' id "com.gradleup.shadow" version "8.3.6" apply false id "me.champeau.jmh" version "0.7.0" apply false @@ -98,7 +98,10 @@ nexusPublishing { allowInsecureProtocol = true } } else { + // see https://central.sonatype.org/publish/publish-portal-ossrh-staging-api/#configuration 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") } diff --git a/gradle/repositories.gradle b/gradle/repositories.gradle index cdcbb792a2d..f492673ddba 100644 --- a/gradle/repositories.gradle +++ b/gradle/repositories.gradle @@ -15,7 +15,7 @@ repositories { mavenContent { snapshotsOnly() } - url 'https://oss.sonatype.org/content/repositories/snapshots/' + url 'https://ossrh-staging-api.central.sonatype.com/content/repositories/snapshots/' } ivy { artifactPattern 'https://sqreen-ci-java.s3.amazonaws.com/jars/[organisation]/[artifact]-[revision](-[classifier]).[ext]'