diff --git a/RedisBungee-API/build.gradle.kts b/RedisBungee-API/build.gradle.kts index c959c34..5050b4b 100644 --- a/RedisBungee-API/build.gradle.kts +++ b/RedisBungee-API/build.gradle.kts @@ -4,37 +4,22 @@ import java.io.ByteArrayOutputStream plugins { `java-library` `maven-publish` - checkstyle id("net.kyori.blossom") version "1.2.0" } - -repositories { - mavenCentral() -} - - -val jedisVersion = "5.1.2" -val configurateVersion = "3.7.3" -val guavaVersion = "31.1-jre" -val okHttpVersion = "2.7.5" -val caffeineVersion = "3.1.8" -val adventureVersion = "4.16.0" - dependencies { - api("com.google.guava:guava:$guavaVersion") - api("redis.clients:jedis:$jedisVersion") - api("com.squareup.okhttp:okhttp:$okHttpVersion") - api("org.spongepowered:configurate-yaml:$configurateVersion") - api("com.github.ben-manes.caffeine:caffeine:$caffeineVersion") - - api("net.kyori:adventure-api:$adventureVersion") - api("net.kyori:adventure-text-serializer-gson:$adventureVersion") - api("net.kyori:adventure-text-serializer-legacy:$adventureVersion") - api("net.kyori:adventure-text-serializer-plain:$adventureVersion") - api("net.kyori:adventure-text-minimessage:$adventureVersion") - + api(libs.guava) + api(libs.jedis) + api(libs.okhttp) + api(libs.configurate) + api(libs.caffeine) + api(libs.adventure.api) + api(libs.adventure.gson) + api(libs.adventure.legacy) + api(libs.adventure.plain) + api(libs.adventure.miniMessage) + implementation(libs.acf.core) } description = "RedisBungee interfaces" @@ -54,10 +39,6 @@ blossom { replaceToken("@build_date@", "${Instant.now().epochSecond}") } -checkstyle { - toolVersion = "10.12.3" -} - java { withJavadocJar() @@ -70,6 +51,10 @@ tasks { val options = options as StandardJavadocDocletOptions options.use() options.isDocFilesSubDirs = true + val jedisVersion = libs.jedis.get().version + val configurateVersion = libs.configurate.get().version + val guavaVersion = libs.guava.get().version + val adventureVersion = libs.guava.get().version options.links( "https://configurate.aoeu.xyz/$configurateVersion/apidocs/", // configurate "https://javadoc.io/doc/redis.clients/jedis/$jedisVersion/", // jedis diff --git a/RedisBungee-Bungee/build.gradle.kts b/RedisBungee-Bungee/build.gradle.kts index 8569404..e11d326 100644 --- a/RedisBungee-Bungee/build.gradle.kts +++ b/RedisBungee-Bungee/build.gradle.kts @@ -1,30 +1,20 @@ plugins { `java-library` `maven-publish` - checkstyle id("com.github.johnrengelman.shadow") version "8.1.1" id("xyz.jpenilla.run-waterfall") version "2.0.0" } -repositories { - mavenCentral() - maven { url = uri("https://oss.sonatype.org/content/repositories/snapshots") } // bungeecord -} - -checkstyle { - toolVersion = "10.12.3" -} - -val bungeecordApiVersion = "1.20-R0.1-SNAPSHOT" dependencies { api(project(":RedisBungee-API")) - compileOnly("net.md-5:bungeecord-api:$bungeecordApiVersion") { + compileOnly(libs.platform.bungeecord) { exclude("com.google.guava", "guava") exclude("com.google.code.gson", "gson") exclude("net.kyori","adventure-api") } - implementation("net.kyori:adventure-platform-bungeecord:4.3.2") - implementation("net.kyori:adventure-text-serializer-gson:4.15.0") + implementation(libs.adventure.platforms.bungeecord) + implementation(libs.adventure.gson) + implementation(libs.acf.bungeecord) } description = "RedisBungee Bungeecord implementation" @@ -83,6 +73,9 @@ tasks { relocate("com.google.j2objc", "com.imaginarycode.minecraft.redisbungee.internal.com.google.j2objc") relocate("com.google.thirdparty", "com.imaginarycode.minecraft.redisbungee.internal.com.google.thirdparty") relocate("com.github.benmanes.caffeine", "com.imaginarycode.minecraft.redisbungee.internal.caffeine") + // acf shade + relocate("co.aikar.commands", "com.imaginarycode.minecraft.redisbungee.internal.acf.commands") + } } diff --git a/RedisBungee-Velocity/build.gradle.kts b/RedisBungee-Velocity/build.gradle.kts index 6aae865..f9d301f 100644 --- a/RedisBungee-Velocity/build.gradle.kts +++ b/RedisBungee-Velocity/build.gradle.kts @@ -1,16 +1,11 @@ plugins { `java-library` `maven-publish` - checkstyle id("com.github.johnrengelman.shadow") version "8.1.1" id("xyz.jpenilla.run-velocity") version "2.0.0" } -repositories { - mavenCentral() - maven { url = uri("https://repo.papermc.io/repository/maven-public/") } -} dependencies { api(project(":RedisBungee-API")) { @@ -24,10 +19,11 @@ dependencies { exclude("net.kyori", "adventure-text-serializer-legacy") exclude("net.kyori", "adventure-text-serializer-plain") exclude("net.kyori", "adventure-text-minimessage") - } - compileOnly("com.velocitypowered:velocity-api:3.3.0-SNAPSHOT") - annotationProcessor("com.velocitypowered:velocity-api:3.3.0-SNAPSHOT") + compileOnly(libs.platform.velocity) + annotationProcessor(libs.platform.velocity) + implementation(libs.acf.velocity) + } description = "RedisBungee Velocity implementation" @@ -36,10 +32,6 @@ java { withJavadocJar() withSourcesJar() } -checkstyle { - toolVersion = "10.12.3" -} - tasks { withType { @@ -75,6 +67,8 @@ tasks { relocate("okio", "com.imaginarycode.minecraft.redisbungee.internal.okio") relocate("org.json", "com.imaginarycode.minecraft.redisbungee.internal.json") relocate("com.github.benmanes.caffeine", "com.imaginarycode.minecraft.redisbungee.internal.caffeine") + // acf shade + relocate("co.aikar.commands", "com.imaginarycode.minecraft.redisbungee.internal.acf.commands") } } diff --git a/config/checkstyle/checkstyle.xml b/config/checkstyle/checkstyle.xml deleted file mode 100644 index bc47e7e..0000000 --- a/config/checkstyle/checkstyle.xml +++ /dev/null @@ -1,382 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/settings.gradle.kts b/settings.gradle.kts index 181ac78..81024f8 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -9,3 +9,67 @@ rootProject.name = "RedisBungee-Parent" include(":RedisBungee-Velocity") include(":RedisBungee-Bungee") include(":RedisBungee-API") + +dependencyResolutionManagement { + repositories { + mavenCentral() + maven { + name = "PaperMC" + url = uri("https://repo.papermc.io/repository/maven-public/") + } + maven { + // hosts the bungeecord apis + name = "sonatype" + url = uri("https://oss.sonatype.org/content/repositories/snapshots") + } + maven { + name = "aikar repo" + url = uri("https://repo.aikar.co/content/groups/aikar/") + } + + } + versionCatalogs { + val jedisVersion = "5.1.2" + val configurateVersion = "3.7.3" + val guavaVersion = "31.1-jre" + val okHttpVersion = "2.7.5" + val caffeineVersion = "3.1.8" + val adventureVersion = "4.16.0" + val acf = "0.5.1-SNAPSHOT" + val bungeecordApiVersion = "1.20-R0.1-SNAPSHOT" + val velocityVersion = "3.3.0-SNAPSHOT"; + + + create("libs") { + + library("guava", "com.google.guava:guava:$guavaVersion") + library("jedis", "redis.clients:jedis:$jedisVersion") + library("okhttp", "com.squareup.okhttp:okhttp:$okHttpVersion") + library("configurate", "org.spongepowered:configurate-yaml:$configurateVersion") + library("caffeine", "com.github.ben-manes.caffeine:caffeine:$caffeineVersion") + + library("adventure-api", "net.kyori:adventure-api:$adventureVersion") + library("adventure-gson", "net.kyori:adventure-text-serializer-gson:$adventureVersion") + library("adventure-legacy", "net.kyori:adventure-text-serializer-legacy:$adventureVersion") + library("adventure-plain", "net.kyori:adventure-text-serializer-plain:$adventureVersion") + library("adventure-miniMessage", "net.kyori:adventure-text-minimessage:$adventureVersion") + + library("acf-core", "co.aikar:acf-core:$acf") + library("acf-bungeecord", "co.aikar:acf-bungee:$acf") + library("acf-velocity", "co.aikar:acf-velocity:$acf") + + library("platform-bungeecord","net.md-5:bungeecord-api:$bungeecordApiVersion") + library("adventure-platforms-bungeecord", "net.kyori:adventure-platform-bungeecord:4.3.2") + + library("platform-velocity", "com.velocitypowered:velocity-api:$velocityVersion") + + + + + } + + + } + + +} \ No newline at end of file