Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
111649f
Migrates to Gradle
EarthCow Jan 3, 2026
a160b15
Changes build workflow to use gradle
EarthCow Jan 3, 2026
dff76c6
Fixes build workflow
EarthCow Jan 3, 2026
7df4ed4
Stops ignoring ./gradle
EarthCow Jan 3, 2026
81f449b
Merge branch 'gradle' into dev
EarthCow Jan 3, 2026
3c7ce3c
Makes the Message webhook field local to #execute
EarthCow Jan 4, 2026
13d6ffc
Transitions to dependency injection
EarthCow Jan 4, 2026
81e7435
Adds null annotations
EarthCow Jan 4, 2026
6970431
Merge branch 'dependency-injection' into dev
EarthCow Jan 4, 2026
c855ed3
String#replaceAll -> #replace
EarthCow Jan 5, 2026
98474ff
Condenses placeholder handling logic
EarthCow Jan 5, 2026
df3385a
Uses toString in Utils for efficiency
EarthCow Jan 5, 2026
d050cd5
handleFloodgatePlaceholders -> getPlayerOs
EarthCow Jan 5, 2026
4d85584
Replaces all placeholders at the same time
EarthCow Jan 5, 2026
27113c9
Correctly converts the category color to a decimal color
EarthCow Jan 6, 2026
2103509
Implements immutable template pattern
EarthCow Jan 6, 2026
bd24b2a
Separates handling into a new class: HandlingService
EarthCow Jan 6, 2026
47ad517
Generic Map definition in case Map class changes
EarthCow Jan 6, 2026
15d0b2c
Replaces the handling map of maps with a map of records
EarthCow Jan 6, 2026
03d2ecc
Implements a record key to avoid repetitive string concatenation
EarthCow Jan 6, 2026
2310075
Adds constants to remove magic numbers
EarthCow Jan 6, 2026
74428e8
Uses Google Guava Cache to remove inactive records
EarthCow Jan 6, 2026
24c945a
Handling configuration validation
EarthCow Jan 6, 2026
f1739ed
Improves handling logic & ensures repetition-threshold is a double
EarthCow Jan 6, 2026
71e3d60
Shuts down executor threads when the plugin is disabled
EarthCow Jan 6, 2026
2aeba80
Adds bStats metrics
EarthCow Jan 7, 2026
e672c1e
Bump to version 0.3.1
EarthCow Jan 8, 2026
9cc9fe1
Adds a warning msg when color parsing fails
EarthCow Jan 8, 2026
9b90cb9
Lessens Message method complexity
EarthCow Jan 8, 2026
c5ef29a
Fixes constant timestamp of initialization
EarthCow Jan 8, 2026
1ffa57c
Optimizes imports & ensures json payload is not null
EarthCow Jan 8, 2026
d81ca19
Uses an empty string as default to prevent NPE
EarthCow Jan 8, 2026
b948b66
Uses v1.3.0 of JavaDiscordWebhook instead of building master
EarthCow Jan 8, 2026
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
10 changes: 6 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Builds a Java project with Maven
# Builds a Java project with Gradle
name: Build

on:
Expand All @@ -20,7 +20,9 @@ jobs:
with:
java-version: '17'
distribution: 'temurin'
cache: maven

- name: Build with Maven
run: mvn -B package
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4

- name: Build with Gradle
run: ./gradlew build
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,9 @@ out/
# Maven
target/

# Gradle
.gradle/
build/

# Common working directory
run/
64 changes: 64 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
plugins {
`java-library`
// Shade plugin
id("com.gradleup.shadow") version "9.3.0"
}

repositories {
mavenCentral()
// Spigot
maven("https://hub.spigotmc.org/nexus/content/repositories/snapshots/")
// Jitpack
maven("https://jitpack.io")
// Floodgate / Geyser
maven("https://repo.opencollab.dev/main/")
}

dependencies {
implementation(libs.dev.dejvokep.boosted.yaml)
implementation(libs.com.github.earthcow.javadiscordwebhook)
implementation(libs.org.bstats.bstats.api)

compileOnly(files("libs/ThemisAPI.jar"))
compileOnly(libs.org.spigotmc.spigot.api)
compileOnly(libs.org.jetbrains.annotations)
compileOnly(libs.org.geysermc.floodgate.api)
}

group = "xyz.earthcow"
version = "0.3.1"

tasks.withType<JavaCompile>() {
options.encoding = "UTF-8"
}

tasks.withType<Javadoc>() {
options.encoding = "UTF-8"
}

tasks.processResources {
val props = mapOf(
"name" to project.name,
"version" to project.version,
)

inputs.properties(props)

filesMatching("plugin.yml") {
expand(props)
}
}

tasks.shadowJar {
// Overwrite default jar
archiveClassifier.set("")
// Relocate shaded dependencies to internal libs directory
relocate("dev.dejvokep.boostedyaml", "xyz.earthcow.themistodiscord.libs.boostedyaml")
relocate("org.bstats", "xyz.earthcow.themistodiscord.libs.bstats")
// Exclude annotation packages from the uber jar file
exclude("org/intellij/**", "org/jetbrains/**")
}

tasks.build {
dependsOn(tasks.shadowJar)
}
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
18 changes: 18 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# This file was generated by the Gradle 'init' task.
# https://docs.gradle.org/current/userguide/platforms.html#sub::toml-dependencies-format

[versions]
com-github-earthcow-javadiscordwebhook = "v1.3.0"
dev-dejvokep-boosted-yaml = "1.3.7"
org-geysermc-floodgate-api = "2.2.4-SNAPSHOT"
org-jetbrains-annotations = "24.1.0"
org-spigotmc-spigot-api = "1.17-R0.1-SNAPSHOT"
org-bstats-bstats-api = "3.1.0"

[libraries]
com-github-earthcow-javadiscordwebhook = { module = "com.github.EarthCow:JavaDiscordWebhook", version.ref = "com-github-earthcow-javadiscordwebhook" }
dev-dejvokep-boosted-yaml = { module = "dev.dejvokep:boosted-yaml", version.ref = "dev-dejvokep-boosted-yaml" }
org-geysermc-floodgate-api = { module = "org.geysermc.floodgate:api", version.ref = "org-geysermc-floodgate-api" }
org-jetbrains-annotations = { module = "org.jetbrains:annotations", version.ref = "org-jetbrains-annotations" }
org-spigotmc-spigot-api = { module = "org.spigotmc:spigot-api", version.ref = "org-spigotmc-spigot-api" }
org-bstats-bstats-api = { module = "org.bstats:bstats-bukkit", version.ref = "org-bstats-bstats-api" }
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
7 changes: 7 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.0-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
248 changes: 248 additions & 0 deletions gradlew

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

Loading