Skip to content

Commit 7a46250

Browse files
committed
Made central publishing work and documented it in jqwik.common-configuration.gradle
1 parent 348945f commit 7a46250

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

buildSrc/src/main/groovy/jqwik.common-configuration.gradle

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,9 @@ publishing {
2020
repositories {
2121
maven {
2222
// hint: credentials are in ~/.gradle/gradle.properties
23-
// Since June 2024 Sonatype seems to require a token for publishing
24-
def repoUsername = project.hasProperty('tokenUsername') ? project.tokenUsername : ''
25-
def repoPassword = project.hasProperty('tokenPassword') ? project.tokenPassword : ''
26-
27-
//def repoUsername = project.hasProperty('sonatypeUsername') ? project.sonatypeUsername : ''
28-
//def repoPassword = project.hasProperty('sonatypePassword') ? project.sonatype : ''
23+
// Since June 2025 there is a new portal which requires new tokens
24+
def repoUsername = project.hasProperty('portalTokenUsername') ? project.portalTokenUsername : ''
25+
def repoPassword = project.hasProperty('portalTokenPassword') ? project.portalTokenPassword : ''
2926

3027
credentials {
3128
username = repoUsername
@@ -46,11 +43,13 @@ publishing {
4643

4744
url = isSnapshotRelease ? snapshotsRepoUrl : releasesRepoUrl
4845

49-
// Additional requests to execute for manual deployments as suggested in documentation:
50-
// One of:
51-
// - curl -X POST https://ossrh-staging-api.central.sonatype.com/manual/upload/defaultRepository/net.jqwik
52-
// - curl -G -d "ip=any" -d "profile_id=net.jqwik" https://ossrh-staging-api.central.sonatype.com/manual/search/repositories
53-
// Sadly, both did not lead to deployment showing up on central.sonatype.com
46+
// Release versions require an additional request to be executed for manual deployments:
47+
/*
48+
curl -X 'POST' \
49+
'https://ossrh-staging-api.central.sonatype.com/manual/upload/defaultRepository/net.jqwik' \
50+
-H 'accept: application/json' \
51+
-H 'Authorization: Bearer <BASE64 token>'
52+
*/
5453

5554
}
5655
}

0 commit comments

Comments
 (0)