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
14 changes: 8 additions & 6 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 @@ -13,14 +13,16 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up JDK 21
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: '21'
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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
/bin/
/target/
/build/
/.gradle
/.project
/.settings/

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ A modern continuation of [BungeeJoinMessages](https://github.com/Tirco/BungeeJoi
- [PAPIProxyBridge](https://www.spigotmc.org/resources/papiproxybridge.108415/)
- [MiniPlaceholders](https://modrinth.com/plugin/miniplaceholders)
- Support for legacy and MiniMessage formatting
- Support for [PremiumVanish](https://www.spigotmc.org/resources/premiumvanish-stay-hidden-bungee-velocity-support.14404/) and [LimboAPI](https://github.com/Elytrium/LimboAPI)
- Support for [SayanVanish](https://modrinth.com/plugin/sayanvanish), [PremiumVanish](https://www.spigotmc.org/resources/premiumvanish-stay-hidden-bungee-velocity-support.14404/) and [LimboAPI](https://github.com/Elytrium/LimboAPI)

## Installation
1. Download the latest release from [SpigotMC](https://www.spigotmc.org/resources/118643/)
Expand Down
148 changes: 148 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
plugins {
`java`
`maven-publish`
// Shade plugin
id("com.gradleup.shadow") version "8.3.8"
// Blossom plugin for Pebble templating
id("org.jetbrains.gradle.plugin.idea-ext") version "1.3"
id("net.kyori.blossom") version "2.1.0"
}

group = property("group") as String
version = property("version") as String
description = property("description") as String

java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(21))
}
}

repositories {
mavenCentral()
// Sonatype
maven("https://oss.sonatype.org/content/repositories/snapshots")
// PaperMC
maven("https://repo.papermc.io/repository/maven-public/")
// Jitpack
maven("https://jitpack.io")
// William278
maven("https://repo.william278.net/releases/")
// Elytrium
maven("https://maven.elytrium.net/repo/")
// SayanDevelopment
maven("https://repo.sayandev.org/snapshots") {
content {
includeGroup("org.sayandev")
}
}
}

dependencies {
// Proxy APIs
compileOnly("net.md-5:bungeecord-api:1.21-R0.2")
compileOnly("com.velocitypowered:velocity-api:3.4.0-SNAPSHOT")
annotationProcessor("com.velocitypowered:velocity-api:3.4.0-SNAPSHOT")
compileOnly("com.velocitypowered:velocity-proxy:3.4.0-SNAPSHOT") {
exclude(group = "com.velocitypowered", module = "velocity-proxy-log4j2-plugin")
}

// bStats
implementation("org.bstats:bstats-bungeecord:3.0.2")
implementation("org.bstats:bstats-velocity:3.0.2")

// Utilities
compileOnly("org.projectlombok:lombok:1.18.42")
annotationProcessor("org.projectlombok:lombok:1.18.42")
testCompileOnly("org.projectlombok:lombok:1.18.42")
testAnnotationProcessor("org.projectlombok:lombok:1.18.42")

implementation("com.google.code.gson:gson:2.13.2")
implementation("org.jetbrains:annotations:16.0.1")
implementation("com.h2database:h2:2.2.224")

// Adventure & MiniMessage
implementation("net.kyori:adventure-platform-bungeecord:4.4.1")
implementation("net.kyori:adventure-text-minimessage:4.24.0")
implementation("net.kyori:adventure-text-serializer-plain:4.24.0")

// MiniPlaceholders
compileOnly("io.github.miniplaceholders:miniplaceholders-api:3.0.1")

// SayanVanish
compileOnly("org.sayandev:sayanvanish-api:1.7.0-SNAPSHOT")
// PremiumVanish
compileOnly("com.github.LeonMangler:PremiumVanishAPI:2.9.18-2")
// PAPIProxyBridge
compileOnly("net.william278:papiproxybridge:1.8")
// LuckPerms
compileOnly("net.luckperms:api:5.4")

// Boosted Yaml
implementation("dev.dejvokep:boosted-yaml:1.3.6")
// Discord Webhooks
implementation("com.github.EarthCow:JavaDiscordWebhook:1.2.0")

// Testing
testImplementation("org.junit.jupiter:junit-jupiter:5.7.1")
testRuntimeOnly("org.junit.platform:junit-platform-launcher")

// Mockito
testImplementation("org.mockito:mockito-core:5.19.0")
testImplementation("org.mockito:mockito-junit-jupiter:5.19.0")

testImplementation("com.google.code.gson:gson:2.13.2")
testImplementation("org.jetbrains:annotations:16.0.1")
testImplementation("com.h2database:h2:2.2.224")

testImplementation("net.luckperms:api:5.4")
testImplementation("net.kyori:adventure-text-serializer-plain:4.24.0")
testImplementation("io.github.miniplaceholders:miniplaceholders-api:3.0.1")
}

sourceSets {
main {
blossom {
javaSources {
property("version", project.version.toString())
}
}
}
}

configurations.all {
exclude(group = "junit", module = "junit")
}

tasks.test {
useJUnitPlatform()
}

tasks.processResources {
filesMatching("plugin.yml") {
expand(
"name" to project.name,
"version" to project.version,
"description" to project.description,
"group" to project.group,
"url" to project.property("url"),
"mainClass" to project.property("mainClass"),
"author" to project.property("author")
)
}
}

tasks.shadowJar {
// Overwrite default jar
archiveClassifier.set("")
relocate("org.bstats", "xyz.earthcow.networkjoinmessages.libs.bstats")
relocate("dev.dejvokep.boostedyaml", "xyz.earthcow.networkjoinmessages.libs.boostedyaml")

dependencies {
exclude(dependency("io.github.miniplaceholders:miniplaceholders-api"))
}
}

tasks.build {
dependsOn(tasks.shadowJar)
}
9 changes: 9 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Project metadata
group=xyz.earthcow.networkjoinmessages
version=3.1.0
description=A plugin handling join, leave and swap messages for proxy servers.

# Plugin.yml metadata
url=https://github.com/RagingTech/NetworkJoinMessages/
author=Tirco and EarthCow
mainClass=xyz.earthcow.networkjoinmessages.bungee.BungeeMain
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-8.10-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading