From 52d2744c45a68208b513ecd0c37a2aa6bb97054f Mon Sep 17 00:00:00 2001 From: Johannes Link Date: Fri, 21 Jun 2024 13:44:01 +0200 Subject: [PATCH] Switch Sonatype publishing to user token instead of user/pw credentials --- .../main/groovy/jqwik.common-configuration.gradle | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/buildSrc/src/main/groovy/jqwik.common-configuration.gradle b/buildSrc/src/main/groovy/jqwik.common-configuration.gradle index a44f39984..47a509ffd 100644 --- a/buildSrc/src/main/groovy/jqwik.common-configuration.gradle +++ b/buildSrc/src/main/groovy/jqwik.common-configuration.gradle @@ -20,12 +20,16 @@ publishing { repositories { maven { // hint: credentials are in ~/.gradle/gradle.properties - def ossrhUsername = project.hasProperty('ossrhUsername') ? project.ossrhUsername : '' - def ossrhPassword = project.hasProperty('ossrhPassword') ? project.ossrhPassword : '' + // Since June 2024 Sonatype seems to require a token for publishing + def repoUsername = project.hasProperty('tokenUsername') ? project.tokenUsername : '' + def repoPassword = project.hasProperty('tokenPassword') ? project.tokenPassword : '' + + //def repoUsername = project.hasProperty('sonatypeUsername') ? project.sonatypeUsername : '' + //def repoPassword = project.hasProperty('sonatypePassword') ? project.sonatype : '' credentials { - username = ossrhUsername - password = ossrhPassword + username = repoUsername + password = repoPassword } // change URLs to point to your repos, e.g. http://my.org/repo