mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-07-04 22:54:43 +02:00
Compare commits
9 Commits
Author | SHA1 | Date | |
---|---|---|---|
092ee41e52 | |||
7dbd0bcff8 | |||
9626302f04 | |||
1b4a347e8b | |||
19e6ed4b9b | |||
6b1b0f2d6a | |||
e499bc02ec | |||
62084fffdd | |||
d012f79349 |
12
.github/workflows/build.yml
vendored
12
.github/workflows/build.yml
vendored
@ -29,18 +29,18 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
- name: Publish Release
|
- name: Publish Release
|
||||||
if: ${{ runner.os == 'Linux' && env.STATUS == 'release' && github.event_name == 'push' && github.ref == 'refs/heads/main'}}
|
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:
|
env:
|
||||||
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.SONATYPE_USERNAME }}
|
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.CENTRAL_USERNAME }}
|
||||||
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.SONATYPE_PASSWORD }}
|
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.CENTRAL_PASSWORD }}
|
||||||
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.SIGNING_KEY }}
|
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.SIGNING_KEY }}
|
||||||
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SIGNING_PASSWORD }}
|
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SIGNING_PASSWORD }}
|
||||||
- name: Publish Snapshot
|
- name: Publish Snapshot
|
||||||
if: ${{ runner.os == 'Linux' && env.STATUS != 'release' && github.event_name == 'push' && github.ref == 'refs/heads/main' }}
|
if: ${{ runner.os == 'Linux' && env.STATUS != 'release' && github.event_name == 'push' && github.ref == 'refs/heads/main' }}
|
||||||
run: ./gradlew publishToSonatype
|
run: ./gradlew publishAllPublicationsToMavenCentralRepository
|
||||||
env:
|
env:
|
||||||
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.SONATYPE_USERNAME }}
|
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.CENTRAL_USERNAME }}
|
||||||
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.SONATYPE_PASSWORD }}
|
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.CENTRAL_PASSWORD }}
|
||||||
- name: Publish core javadoc
|
- name: Publish core javadoc
|
||||||
if: ${{ runner.os == 'Linux' && env.STATUS == 'release' && github.event_name == 'push' && github.ref == 'refs/heads/main'}}
|
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
|
uses: cpina/github-action-push-to-another-repository@main
|
||||||
|
@ -3,7 +3,7 @@ import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
|
|||||||
repositories {
|
repositories {
|
||||||
maven {
|
maven {
|
||||||
name = "PlaceholderAPI"
|
name = "PlaceholderAPI"
|
||||||
url = uri("https://repo.extendedclip.com/content/repositories/placeholderapi/")
|
url = uri("https://repo.extendedclip.com/releases/")
|
||||||
}
|
}
|
||||||
|
|
||||||
maven {
|
maven {
|
||||||
|
@ -252,6 +252,11 @@ public final class BukkitPlatform extends JavaPlugin implements Listener, PlotPl
|
|||||||
return Bukkit.getVersion();
|
return Bukkit.getVersion();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public @NonNull String serverBrand() {
|
||||||
|
return Bukkit.getName();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SuppressWarnings("deprecation") // Paper deprecation
|
@SuppressWarnings("deprecation") // Paper deprecation
|
||||||
public void onEnable() {
|
public void onEnable() {
|
||||||
|
@ -120,6 +120,14 @@ public interface PlotPlatform<P> extends LocaleHolder {
|
|||||||
*/
|
*/
|
||||||
@NonNull String serverImplementation();
|
@NonNull String serverImplementation();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the server brand name
|
||||||
|
*
|
||||||
|
* @return server brand
|
||||||
|
* @since TODO
|
||||||
|
*/
|
||||||
|
@NonNull String serverBrand();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the native server code package prefix.
|
* Gets the native server code package prefix.
|
||||||
*
|
*
|
||||||
|
@ -86,7 +86,8 @@ public class DebugPaste extends SubCommand {
|
|||||||
b.append("# WorldEdit implementation:\n");
|
b.append("# WorldEdit implementation:\n");
|
||||||
b.append(PlotSquared.platform().worldEditImplementations()).append("\n\n");
|
b.append(PlotSquared.platform().worldEditImplementations()).append("\n\n");
|
||||||
b.append("# Server Information\n");
|
b.append("# Server Information\n");
|
||||||
b.append("Server Version: ").append(PlotSquared.platform().serverImplementation())
|
b.append("Server Version: ").append(PlotSquared.platform().serverBrand()).append(": ")
|
||||||
|
.append(PlotSquared.platform().serverImplementation()).append("\n")
|
||||||
.append("\n");
|
.append("\n");
|
||||||
b.append("online_mode: ").append(!Settings.UUID.OFFLINE).append(';')
|
b.append("online_mode: ").append(!Settings.UUID.OFFLINE).append(';')
|
||||||
.append(!Settings.UUID.OFFLINE).append('\n');
|
.append(!Settings.UUID.OFFLINE).append('\n');
|
||||||
|
@ -444,7 +444,7 @@ public abstract class PlotPlayer<P> implements CommandCaller, OfflinePlotPlayer,
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get this player's UUID.
|
* Get this player's UUID.
|
||||||
* === !IMPORTANT ===<br>
|
* <p>=== !IMPORTANT ===</p>
|
||||||
* The UUID is dependent on the mode chosen in the settings.yml and may not be the same as Bukkit has
|
* The UUID is dependent on the mode chosen in the settings.yml and may not be the same as Bukkit has
|
||||||
* (especially if using an old version of Bukkit that does not support UUIDs)
|
* (especially if using an old version of Bukkit that does not support UUIDs)
|
||||||
*
|
*
|
||||||
|
150
build.gradle.kts
150
build.gradle.kts
@ -1,5 +1,6 @@
|
|||||||
import com.diffplug.gradle.spotless.SpotlessPlugin
|
import com.diffplug.gradle.spotless.SpotlessPlugin
|
||||||
import com.github.jengelman.gradle.plugins.shadow.ShadowPlugin
|
import com.github.jengelman.gradle.plugins.shadow.ShadowPlugin
|
||||||
|
import com.vanniktech.maven.publish.SonatypeHost
|
||||||
import groovy.json.JsonSlurper
|
import groovy.json.JsonSlurper
|
||||||
import xyz.jpenilla.runpaper.task.RunServer
|
import xyz.jpenilla.runpaper.task.RunServer
|
||||||
import java.net.URI
|
import java.net.URI
|
||||||
@ -7,13 +8,12 @@ import java.net.URI
|
|||||||
plugins {
|
plugins {
|
||||||
java
|
java
|
||||||
`java-library`
|
`java-library`
|
||||||
`maven-publish`
|
|
||||||
signing
|
signing
|
||||||
|
|
||||||
alias(libs.plugins.shadow)
|
alias(libs.plugins.shadow)
|
||||||
alias(libs.plugins.spotless)
|
alias(libs.plugins.spotless)
|
||||||
alias(libs.plugins.grgit)
|
alias(libs.plugins.grgit)
|
||||||
alias(libs.plugins.nexus)
|
alias(libs.plugins.publish)
|
||||||
|
|
||||||
eclipse
|
eclipse
|
||||||
idea
|
idea
|
||||||
@ -22,7 +22,7 @@ plugins {
|
|||||||
}
|
}
|
||||||
|
|
||||||
group = "com.intellectualsites.plotsquared"
|
group = "com.intellectualsites.plotsquared"
|
||||||
version = "7.5.2"
|
version = "7.5.3-SNAPSHOT"
|
||||||
|
|
||||||
if (!File("$rootDir/.git").exists()) {
|
if (!File("$rootDir/.git").exists()) {
|
||||||
logger.lifecycle("""
|
logger.lifecycle("""
|
||||||
@ -41,16 +41,6 @@ subprojects {
|
|||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
|
|
||||||
maven {
|
|
||||||
name = "Sonatype OSS"
|
|
||||||
url = uri("https://oss.sonatype.org/content/repositories/snapshots/")
|
|
||||||
}
|
|
||||||
|
|
||||||
maven {
|
|
||||||
name = "Sonatype OSS (S01)"
|
|
||||||
url = uri("https://s01.oss.sonatype.org/content/repositories/snapshots/")
|
|
||||||
}
|
|
||||||
|
|
||||||
maven {
|
maven {
|
||||||
name = "Jitpack"
|
name = "Jitpack"
|
||||||
url = uri("https://jitpack.io")
|
url = uri("https://jitpack.io")
|
||||||
@ -68,7 +58,7 @@ subprojects {
|
|||||||
apply {
|
apply {
|
||||||
plugin<JavaPlugin>()
|
plugin<JavaPlugin>()
|
||||||
plugin<JavaLibraryPlugin>()
|
plugin<JavaLibraryPlugin>()
|
||||||
plugin<MavenPublishPlugin>()
|
plugin<com.vanniktech.maven.publish.MavenPublishPlugin>()
|
||||||
plugin<ShadowPlugin>()
|
plugin<ShadowPlugin>()
|
||||||
plugin<SpotlessPlugin>()
|
plugin<SpotlessPlugin>()
|
||||||
plugin<SigningPlugin>()
|
plugin<SigningPlugin>()
|
||||||
@ -79,8 +69,8 @@ subprojects {
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
// Tests
|
// Tests
|
||||||
testImplementation("org.junit.jupiter:junit-jupiter:5.12.1")
|
testImplementation("org.junit.jupiter:junit-jupiter:5.12.2")
|
||||||
testRuntimeOnly("org.junit.platform:junit-platform-launcher:1.12.1")
|
testRuntimeOnly("org.junit.platform:junit-platform-launcher:1.12.2")
|
||||||
}
|
}
|
||||||
|
|
||||||
plugins.withId("java") {
|
plugins.withId("java") {
|
||||||
@ -107,11 +97,6 @@ subprojects {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
java {
|
|
||||||
withSourcesJar()
|
|
||||||
withJavadocJar()
|
|
||||||
}
|
|
||||||
|
|
||||||
val javaComponent = components["java"] as AdhocComponentWithVariants
|
val javaComponent = components["java"] as AdhocComponentWithVariants
|
||||||
javaComponent.withVariantsFromConfiguration(configurations["shadowRuntimeElements"]) {
|
javaComponent.withVariantsFromConfiguration(configurations["shadowRuntimeElements"]) {
|
||||||
skip()
|
skip()
|
||||||
@ -127,66 +112,67 @@ subprojects {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
publishing {
|
mavenPublishing {
|
||||||
publications {
|
coordinates(
|
||||||
create<MavenPublication>("maven") {
|
groupId = "$group",
|
||||||
from(components["java"])
|
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)
|
licenses {
|
||||||
description.set("PlotSquared, a land and world management plugin for Minecraft.")
|
license {
|
||||||
url.set("https://github.com/IntellectualSites/PlotSquared")
|
name.set("GNU General Public License, Version 3.0")
|
||||||
|
url.set("https://www.gnu.org/licenses/gpl-3.0.html")
|
||||||
licenses {
|
distribution.set("repo")
|
||||||
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")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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 +180,6 @@ subprojects {
|
|||||||
|
|
||||||
compileJava {
|
compileJava {
|
||||||
options.compilerArgs.add("-parameters")
|
options.compilerArgs.add("-parameters")
|
||||||
options.isDeprecation = true
|
|
||||||
options.encoding = "UTF-8"
|
options.encoding = "UTF-8"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -217,15 +202,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") {
|
tasks.getByName<Jar>("jar") {
|
||||||
enabled = false
|
enabled = false
|
||||||
}
|
}
|
||||||
|
@ -28,15 +28,15 @@ squirrelid = "0.3.2"
|
|||||||
paster = "1.1.6"
|
paster = "1.1.6"
|
||||||
bstats = "3.1.0"
|
bstats = "3.1.0"
|
||||||
paperlib = "1.0.8"
|
paperlib = "1.0.8"
|
||||||
informative-annotations = "1.5"
|
informative-annotations = "1.6"
|
||||||
vault = "1.7.1"
|
vault = "1.7.1"
|
||||||
serverlib = "2.3.6"
|
serverlib = "2.3.7"
|
||||||
|
|
||||||
# Gradle plugins
|
# Gradle plugins
|
||||||
shadow = "8.3.6"
|
shadow = "8.3.6"
|
||||||
grgit = "4.1.1"
|
grgit = "4.1.1"
|
||||||
spotless = "7.0.2"
|
spotless = "7.0.3"
|
||||||
nexus = "2.0.0"
|
publish = "0.31.0"
|
||||||
runPaper = "2.3.1"
|
runPaper = "2.3.1"
|
||||||
|
|
||||||
[libraries]
|
[libraries]
|
||||||
@ -81,5 +81,5 @@ serverlib = { group = "dev.notmyfault.serverlib", name = "ServerLib", version.re
|
|||||||
shadow = { id = "com.gradleup.shadow", version.ref = "shadow" }
|
shadow = { id = "com.gradleup.shadow", version.ref = "shadow" }
|
||||||
grgit = { id = "org.ajoberstar.grgit", version.ref = "grgit" }
|
grgit = { id = "org.ajoberstar.grgit", version.ref = "grgit" }
|
||||||
spotless = { id = "com.diffplug.spotless", version.ref = "spotless" }
|
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" }
|
runPaper = { id = "xyz.jpenilla.run-paper", version.ref = "runPaper" }
|
||||||
|
Reference in New Issue
Block a user