Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ repositories {
}

dependencies {
implementation("com.gradleup.shadow:shadow-gradle-plugin:8.3.0")
implementation("com.diffplug.spotless:spotless-plugin-gradle:7.0.0.BETA4")
implementation("de.skuzzle.restrictimports:restrict-imports-gradle-plugin:2.6.0")
implementation("com.gradleup.shadow:shadow-gradle-plugin:9.0.0-rc2")
implementation("com.diffplug.spotless:spotless-plugin-gradle:7.2.1")
implementation("de.skuzzle.restrictimports:restrict-imports-gradle-plugin:2.6.1")
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ dependencies {
implementation("redis.clients:jedis:3.5.1")
implementation("co.aikar:idb-core:1.0.0-SNAPSHOT")
implementation("co.aikar:idb-bukkit:1.0.0-SNAPSHOT")
implementation("net.kyori:adventure-api:4.17.0")
implementation("net.kyori:adventure-text-serializer-plain:4.17.0")
implementation("net.kyori:adventure-platform-bukkit:4.3.4")
implementation("net.kyori:adventure-api:4.24.0")
implementation("net.kyori:adventure-text-serializer-plain:4.24.0")
implementation("net.kyori:adventure-platform-bukkit:4.4.1")

compileOnly("app.ashcon:sportpaper:1.8.8-R0.1-SNAPSHOT")
compileOnly("tc.oc.pgm:core:0.16-SNAPSHOT")
Expand All @@ -55,7 +55,7 @@ spotless {
ratchetFrom = "origin/dev"
java {
removeUnusedImports()
palantirJavaFormat("2.47.0").style("GOOGLE").formatJavadoc(true)
palantirJavaFormat("2.73.0").style("GOOGLE").formatJavadoc(true)
}
}

Expand Down
11 changes: 4 additions & 7 deletions buildSrc/src/main/kotlin/extensions.kt
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
import org.gradle.api.Project
import java.io.ByteArrayOutputStream


fun Project.latestCommitHash(): String {
return runGitCommand(listOf("rev-parse", "--short", "HEAD"))
}

fun Project.runGitCommand(args: List<String>): String {
val byteOut = ByteArrayOutputStream()
exec {
commandLine = listOf("git") + args
standardOutput = byteOut
}
return byteOut.toString(Charsets.UTF_8.name()).trim()
return providers.exec {
commandLine("git")
args(args)
}.standardOutput.asText.get().trim()
}
22 changes: 15 additions & 7 deletions core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ tasks.named<ShadowJar>("shadowJar") {
archiveFileName = "Community.jar"
archiveClassifier.set("")
destinationDirectory = rootProject.projectDir.resolve("build/libs")
duplicatesStrategy = DuplicatesStrategy.EXCLUDE

minimize()

Expand Down Expand Up @@ -42,15 +43,22 @@ publishing {

tasks {
processResources {
val name = project.name
val description = project.description
val version = project.version.toString()
val commitHash = project.latestCommitHash()

filesMatching(listOf("plugin.yml")) {
expand(
"name" to project.name,
"description" to project.description,
"mainClass" to "dev.pgm.community.Community",
"version" to project.version,
"commitHash" to project.latestCommitHash(),
"author" to "applenick",
"url" to "https://pgm.dev/")
mapOf(
"name" to name,
"description" to description,
"mainClass" to "dev.pgm.community.Community",
"version" to version,
"commitHash" to commitHash,
"author" to "applenick",
"url" to "https://pgm.dev/")
)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@
/** BlitzMutation - Enables blitz on a non-blitz match * */
public class BlitzMutation extends MutationBase {

private static MutationRangeOption BLITZ_LIVES =
new MutationRangeOption(
"Blitz Lives", "The number of lives per-user", Material.EGG, true, 1, 1, 999);
private static MutationRangeOption BLITZ_LIVES = new MutationRangeOption(
"Blitz Lives", "The number of lives per-user", Material.EGG, true, 1, 1, 999);

private BlitzMatchModule blitz;

Expand All @@ -37,15 +36,15 @@ public Collection<MutationOption> getOptions() {
@Override
public void enable() {
super.enable();
this.blitz =
new BlitzMatchModule(
match,
new BlitzConfig(
BLITZ_LIVES.getValue(),
true,
StaticFilter.ALLOW,
StaticFilter.ALLOW,
StaticFilter.DENY));
this.blitz = new BlitzMatchModule(
match,
new BlitzConfig(
BLITZ_LIVES.getValue(),
true,
false,
StaticFilter.ALLOW,
StaticFilter.ALLOW,
StaticFilter.DENY));

blitz.enable();
match.addListener(blitz, MatchScope.RUNNING);
Expand Down
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
org.gradle.configuration-cache=true
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.0.0-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
11 changes: 5 additions & 6 deletions gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading