Move to new publishing portal (#4630)

* Move to new publishing portal

Signed-off-by: Alexander Brandes <mc.cache@web.de>

* Use new variables

Signed-off-by: Alexander Brandes <mc.cache@web.de>

* Try snapshot

Signed-off-by: Alexander Brandes <mc.cache@web.de>

* Back to main

Signed-off-by: Alexander Brandes <mc.cache@web.de>

---------

Signed-off-by: Alexander Brandes <mc.cache@web.de>
This commit is contained in:
Alexander Brandes
2025-04-20 22:20:30 +02:00
committed by GitHub
parent 19e6ed4b9b
commit 1b4a347e8b
3 changed files with 68 additions and 82 deletions

View File

@ -1,5 +1,6 @@
import com.diffplug.gradle.spotless.SpotlessPlugin
import com.github.jengelman.gradle.plugins.shadow.ShadowPlugin
import com.vanniktech.maven.publish.SonatypeHost
import groovy.json.JsonSlurper
import xyz.jpenilla.runpaper.task.RunServer
import java.net.URI
@ -7,13 +8,12 @@ import java.net.URI
plugins {
java
`java-library`
`maven-publish`
signing
alias(libs.plugins.shadow)
alias(libs.plugins.spotless)
alias(libs.plugins.grgit)
alias(libs.plugins.nexus)
alias(libs.plugins.publish)
eclipse
idea
@ -68,7 +68,7 @@ subprojects {
apply {
plugin<JavaPlugin>()
plugin<JavaLibraryPlugin>()
plugin<MavenPublishPlugin>()
plugin<com.vanniktech.maven.publish.MavenPublishPlugin>()
plugin<ShadowPlugin>()
plugin<SpotlessPlugin>()
plugin<SigningPlugin>()
@ -107,11 +107,6 @@ subprojects {
}
}
java {
withSourcesJar()
withJavadocJar()
}
val javaComponent = components["java"] as AdhocComponentWithVariants
javaComponent.withVariantsFromConfiguration(configurations["shadowRuntimeElements"]) {
skip()
@ -127,66 +122,67 @@ subprojects {
}
}
publishing {
publications {
create<MavenPublication>("maven") {
from(components["java"])
mavenPublishing {
coordinates(
groupId = "$group",
artifactId = project.name,
version = "${project.version}",
)
pom {
pom {
name.set(project.name)
description.set("PlotSquared, a land and world management plugin for Minecraft.")
url.set("https://github.com/IntellectualSites/PlotSquared")
name.set(project.name + " " + project.version)
description.set("PlotSquared, a land and world management plugin for Minecraft.")
url.set("https://github.com/IntellectualSites/PlotSquared")
licenses {
license {
name.set("GNU General Public License, Version 3.0")
url.set("https://www.gnu.org/licenses/gpl-3.0.html")
distribution.set("repo")
}
}
developers {
developer {
id.set("Sauilitired")
name.set("Alexander Söderberg")
organization.set("IntellectualSites")
organizationUrl.set("https://github.com/IntellectualSites")
}
developer {
id.set("NotMyFault")
name.set("Alexander Brandes")
organization.set("IntellectualSites")
organizationUrl.set("https://github.com/IntellectualSites")
email.set("contact(at)notmyfault.dev")
}
developer {
id.set("SirYwell")
name.set("Hannes Greule")
organization.set("IntellectualSites")
organizationUrl.set("https://github.com/IntellectualSites")
}
developer {
id.set("dordsor21")
name.set("dordsor21")
organization.set("IntellectualSites")
organizationUrl.set("https://github.com/IntellectualSites")
}
}
scm {
url.set("https://github.com/IntellectualSites/PlotSquared")
connection.set("scm:git:https://github.com/IntellectualSites/PlotSquared.git")
developerConnection.set("scm:git:git@github.com:IntellectualSites/PlotSquared.git")
tag.set("${project.version}")
}
issueManagement {
system.set("GitHub")
url.set("https://github.com/IntellectualSites/PlotSquared/issues")
}
licenses {
license {
name.set("GNU General Public License, Version 3.0")
url.set("https://www.gnu.org/licenses/gpl-3.0.html")
distribution.set("repo")
}
}
developers {
developer {
id.set("Sauilitired")
name.set("Alexander Söderberg")
organization.set("IntellectualSites")
organizationUrl.set("https://github.com/IntellectualSites")
}
developer {
id.set("NotMyFault")
name.set("Alexander Brandes")
organization.set("IntellectualSites")
organizationUrl.set("https://github.com/IntellectualSites")
email.set("contact(at)notmyfault.dev")
}
developer {
id.set("SirYwell")
name.set("Hannes Greule")
organization.set("IntellectualSites")
organizationUrl.set("https://github.com/IntellectualSites")
}
developer {
id.set("dordsor21")
name.set("dordsor21")
organization.set("IntellectualSites")
organizationUrl.set("https://github.com/IntellectualSites")
}
}
scm {
url.set("https://github.com/IntellectualSites/PlotSquared")
connection.set("scm:git:https://github.com/IntellectualSites/PlotSquared.git")
developerConnection.set("scm:git:git@github.com:IntellectualSites/PlotSquared.git")
tag.set("${project.version}")
}
issueManagement {
system.set("GitHub")
url.set("https://github.com/IntellectualSites/PlotSquared/issues")
}
publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL)
}
}
@ -194,7 +190,6 @@ subprojects {
compileJava {
options.compilerArgs.add("-parameters")
options.isDeprecation = true
options.encoding = "UTF-8"
}
@ -217,15 +212,6 @@ subprojects {
}
}
nexusPublishing {
this.repositories {
sonatype {
nexusUrl.set(URI.create("https://s01.oss.sonatype.org/service/local/"))
snapshotRepositoryUrl.set(URI.create("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
}
}
}
tasks.getByName<Jar>("jar") {
enabled = false
}