Skip to content

Commit fe1ba29

Browse files
committed
API publishing fix, fix publishing URL - sonatype central documentation is wrong
1 parent e615273 commit fe1ba29

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

CubicChunksAPI/build.gradle.kts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -215,8 +215,8 @@ publishing {
215215
logger.warn("Username or password not set, publishing to local repository in build/mvnrepo/")
216216
}
217217
val localUrl = "$buildDir/mvnrepo"
218-
val releasesRepoUrl = "https://central.sonatype.com/api/v1/publisher/deployments/download/"
219-
val snapshotsRepoUrl = "https://central.sonatype.com/api/v1/publisher/deployments/download/"
218+
val releasesRepoUrl = "https://central.sonatype.com/api/v1/publisher/deployments"
219+
val snapshotsRepoUrl = "https://central.sonatype.com/api/v1/publisher/deployments"
220220

221221
setUrl(if (local) localUrl else if (doRelease.toBoolean()) releasesRepoUrl else snapshotsRepoUrl)
222222
if (!local) {
@@ -255,7 +255,7 @@ publishing {
255255
// see https://docs.gradle.org/current/userguide/publishing_customization.html#sec:publishing_maven:conditional_publishing
256256
tasks.withType<PublishToMavenRepository>().configureEach {
257257
val predicate = provider {
258-
(publication == publications["mavenJava"] && repository == repositories.findByName("Sonatype")) ||
258+
(publication == publications["mavenJava"] && repository == repositories.findByName("central")) ||
259259
(publication == publications["versionedMavenJava"] && repository == repositories.findByName("DaPorkchop_"))
260260
}
261261
onlyIf("publishing API to Sonatype repository, and versioned API to DaPorkchop_ repository") {

build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -388,8 +388,8 @@ publishing {
388388
logger.warn("Username or password not set, publishing to local repository in build/mvnrepo/")
389389
}
390390
val localUrl = "$buildDir/mvnrepo"
391-
val releasesRepoUrl = "https://central.sonatype.com/api/v1/publisher/deployments/download/"
392-
val snapshotsRepoUrl = "https://central.sonatype.com/api/v1/publisher/deployments/download/"
391+
val releasesRepoUrl = "https://central.sonatype.com/api/v1/publisher/deployments"
392+
val snapshotsRepoUrl = "https://central.sonatype.com/api/v1/publisher/deployments"
393393

394394
setUrl(if (local) localUrl else if (doRelease.toBoolean()) releasesRepoUrl else snapshotsRepoUrl)
395395
if (!local) {

0 commit comments

Comments
 (0)