mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-04-21 18:56:25 +02:00
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:
parent
19e6ed4b9b
commit
1b4a347e8b
12
.github/workflows/build.yml
vendored
12
.github/workflows/build.yml
vendored
@ -29,18 +29,18 @@ jobs:
|
||||
fi
|
||||
- name: Publish Release
|
||||
if: ${{ runner.os == 'Linux' && env.STATUS == 'release' && github.event_name == 'push' && github.ref == 'refs/heads/main'}}
|
||||
run: ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository
|
||||
run: ./gradlew publishAndReleaseToMavenCentral --no-configuration-cache
|
||||
env:
|
||||
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.SONATYPE_USERNAME }}
|
||||
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.SONATYPE_PASSWORD }}
|
||||
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.CENTRAL_USERNAME }}
|
||||
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.CENTRAL_PASSWORD }}
|
||||
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.SIGNING_KEY }}
|
||||
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SIGNING_PASSWORD }}
|
||||
- name: Publish Snapshot
|
||||
if: ${{ runner.os == 'Linux' && env.STATUS != 'release' && github.event_name == 'push' && github.ref == 'refs/heads/main' }}
|
||||
run: ./gradlew publishToSonatype
|
||||
run: ./gradlew publishAllPublicationsToMavenCentralRepository
|
||||
env:
|
||||
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.SONATYPE_USERNAME }}
|
||||
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.SONATYPE_PASSWORD }}
|
||||
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.CENTRAL_USERNAME }}
|
||||
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.CENTRAL_PASSWORD }}
|
||||
- name: Publish core javadoc
|
||||
if: ${{ runner.os == 'Linux' && env.STATUS == 'release' && github.event_name == 'push' && github.ref == 'refs/heads/main'}}
|
||||
uses: cpina/github-action-push-to-another-repository@main
|
||||
|
@ -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,14 +122,15 @@ subprojects {
|
||||
}
|
||||
}
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
create<MavenPublication>("maven") {
|
||||
from(components["java"])
|
||||
mavenPublishing {
|
||||
coordinates(
|
||||
groupId = "$group",
|
||||
artifactId = project.name,
|
||||
version = "${project.version}",
|
||||
)
|
||||
|
||||
pom {
|
||||
|
||||
name.set(project.name + " " + project.version)
|
||||
name.set(project.name)
|
||||
description.set("PlotSquared, a land and world management plugin for Minecraft.")
|
||||
url.set("https://github.com/IntellectualSites/PlotSquared")
|
||||
|
||||
@ -185,8 +181,8 @@ subprojects {
|
||||
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
|
||||
}
|
||||
|
@ -36,7 +36,7 @@ serverlib = "2.3.7"
|
||||
shadow = "8.3.6"
|
||||
grgit = "4.1.1"
|
||||
spotless = "7.0.3"
|
||||
nexus = "2.0.0"
|
||||
publish = "0.31.0"
|
||||
runPaper = "2.3.1"
|
||||
|
||||
[libraries]
|
||||
@ -81,5 +81,5 @@ serverlib = { group = "dev.notmyfault.serverlib", name = "ServerLib", version.re
|
||||
shadow = { id = "com.gradleup.shadow", version.ref = "shadow" }
|
||||
grgit = { id = "org.ajoberstar.grgit", version.ref = "grgit" }
|
||||
spotless = { id = "com.diffplug.spotless", version.ref = "spotless" }
|
||||
nexus = { id = "io.github.gradle-nexus.publish-plugin", version.ref = "nexus" }
|
||||
publish = { id = "com.vanniktech.maven.publish", version.ref = "publish" }
|
||||
runPaper = { id = "xyz.jpenilla.run-paper", version.ref = "runPaper" }
|
||||
|
Loading…
x
Reference in New Issue
Block a user