From d4c90283d6ffc937e079dec4b9ff235ee9cb912d Mon Sep 17 00:00:00 2001 From: Alexander Brandes Date: Tue, 8 Aug 2023 22:33:24 +0200 Subject: [PATCH] Cleanup dependencies --- .github/renovate.json | 8 +++++++- Bukkit/build.gradle.kts | 20 ++++++++++---------- Core/build.gradle.kts | 22 +++++++++++----------- build.gradle.kts | 6 +----- gradle/libs.versions.toml | 35 +++++++++++++++++++++++++++++++++++ 5 files changed, 64 insertions(+), 27 deletions(-) diff --git a/.github/renovate.json b/.github/renovate.json index a9e88c73c..693a554d5 100644 --- a/.github/renovate.json +++ b/.github/renovate.json @@ -9,5 +9,11 @@ "dependencies" ], "rebaseWhen": "conflicted", - "schedule": ["on the first day of the month"] + "schedule": ["on the first day of the month"], + "ignoreDeps": [ + "com.google.code.gson:gson", + "com.google.guava:guava", + "org.yaml:snakeyaml", + "org.apache.logging.log4j:log4j-api", + ] } diff --git a/Bukkit/build.gradle.kts b/Bukkit/build.gradle.kts index abc3cea42..f51210525 100644 --- a/Bukkit/build.gradle.kts +++ b/Bukkit/build.gradle.kts @@ -21,20 +21,20 @@ dependencies { api(projects.plotsquaredCore) // Metrics - implementation("org.bstats:bstats-bukkit") + implementation(libs.bstatsBukkit) // Paper - compileOnly("io.papermc.paper:paper-api") - implementation("io.papermc:paperlib") + compileOnly(libs.paper) + implementation(libs.paperlib) // Plugins compileOnly(libs.worldeditBukkit) { exclude(group = "org.bukkit") exclude(group = "org.spigotmc") } - compileOnly("com.fastasyncworldedit:FastAsyncWorldEdit-Bukkit") { isTransitive = false } - testImplementation("com.fastasyncworldedit:FastAsyncWorldEdit-Bukkit") { isTransitive = false } - compileOnly("com.github.MilkBowl:VaultAPI") { + compileOnly(libs.faweBukkit) { isTransitive = false } + testImplementation(libs.faweBukkit) { isTransitive = false } + compileOnly(libs.vault) { exclude(group = "org.bukkit") } compileOnly(libs.placeholderapi) @@ -44,15 +44,15 @@ dependencies { // Other libraries implementation(libs.squirrelid) { isTransitive = false } - implementation("dev.notmyfault.serverlib:ServerLib") + implementation(libs.serverlib) // Our libraries implementation(libs.arkitektonika) - implementation("com.intellectualsites.paster:Paster") - implementation("com.intellectualsites.informative-annotations:informative-annotations") + implementation(libs.paster) + implementation(libs.informativeAnnotations) // Adventure - implementation("net.kyori:adventure-platform-bukkit") + implementation(libs.adventureBukkit) } tasks.processResources { diff --git a/Core/build.gradle.kts b/Core/build.gradle.kts index c7b2172ac..4449ccbe6 100644 --- a/Core/build.gradle.kts +++ b/Core/build.gradle.kts @@ -2,18 +2,18 @@ import java.time.format.DateTimeFormatter dependencies { // Expected everywhere. - compileOnlyApi("org.checkerframework:checker-qual") + compileOnlyApi(libs.checkerqual) // Minecraft expectations - compileOnlyApi("com.google.code.gson:gson") - compileOnly("com.google.guava:guava") + compileOnlyApi(libs.gson) + compileOnly(libs.guava) // Platform expectations - compileOnlyApi("org.yaml:snakeyaml") + compileOnlyApi(libs.snakeyaml) // Adventure - api("net.kyori:adventure-api") - api("net.kyori:adventure-text-minimessage") + api(libs.adventureApi) + api(libs.adventureMiniMessage) // Guice api(libs.guice) { @@ -31,19 +31,19 @@ dependencies { exclude(group = "dummypermscompat") } testImplementation(libs.worldeditCore) - compileOnly("com.fastasyncworldedit:FastAsyncWorldEdit-Core") { isTransitive = false } - testImplementation("com.fastasyncworldedit:FastAsyncWorldEdit-Core") { isTransitive = false } + compileOnly(libs.faweBukkit) { isTransitive = false } + testImplementation(libs.faweCore) { isTransitive = false } // Logging - compileOnlyApi("org.apache.logging.log4j:log4j-api") + compileOnlyApi(libs.log4j) // Other libraries api(libs.prtree) api(libs.aopalliance) api(libs.cloudServices) api(libs.arkitektonika) - api("com.intellectualsites.paster:Paster") - api("com.intellectualsites.informative-annotations:informative-annotations") + api(libs.paster) + api(libs.informativeAnnotations) } tasks.processResources { diff --git a/build.gradle.kts b/build.gradle.kts index a29d33b61..f81bccdd5 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -17,7 +17,7 @@ plugins { eclipse idea - id("xyz.jpenilla.run-paper") version "2.1.0" + alias(libs.plugins.runPaper) } group = "com.intellectualsites.plotsquared" @@ -76,10 +76,6 @@ subprojects { plugin() } - dependencies { - implementation(platform("com.intellectualsites.bom:bom-newest:1.34")) - } - dependencies { // Tests testImplementation("org.junit.jupiter:junit-jupiter:5.10.0") diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 95dc281df..2db199ed1 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,10 +1,19 @@ [versions] # Platform expectations +paper = "1.20.1-R0.1-SNAPSHOT" guice = "7.0.0" spotbugs = "4.7.3" +checkerqual = "3.37.0" +gson = "2.10" +guava = "31.1-jre" +snakeyaml = "2.0" +adventure = "4.14.0" +adventure-bukkit = "4.3.0" +log4j = "2.19.0" # Plugins worldedit = "7.2.15" +fawe = "2.7.0" placeholderapi = "2.11.3" luckperms = "5.4" essentialsx = "2.20.0" @@ -16,18 +25,34 @@ aopalliance = "1.0" cloud-services = "1.8.3" arkitektonika = "2.1.2" squirrelid = "0.3.2" +paster = "1.1.5" +bstats = "3.0.2" +paperlib = "1.0.8" +informative-annotations = "1.3" +vault = "1.7.1" +serverlib = "2.3.1" # Gradle plugins shadow = "8.1.1" grgit = "4.1.1" spotless = "6.20.0" nexus = "1.3.0" +runPaper = "2.1.0" [libraries] # Platform expectations +paper = { group = "io.papermc.paper", name = "paper-api", version.ref = "paper" } guice = { group = "com.google.inject", name = "guice", version.ref = "guice" } guiceassistedinject = { group = "com.google.inject.extensions", name = "guice-assistedinject", version.ref = "guice" } spotbugs = { group = "com.github.spotbugs", name = "spotbugs-annotations", version.ref = "spotbugs" } +checkerqual = { group = "org.checkerframework", name = "checker-qual", version.ref = "checkerqual" } +gson = { group = "com.google.code.gson", name = "gson", version.ref = "gson" } +guava = { group = "com.google.guava", name = "guava", version.ref = "guava" } +snakeyaml = { group = "org.yaml", name = "snakeyaml", version.ref = "snakeyaml" } +adventureApi = { group = "net.kyori", name = "adventure-api", version.ref = "adventure" } +adventureMiniMessage = { group = "net.kyori", name = "adventure-text-minimessage", version.ref = "adventure" } +adventureBukkit = { group = "net.kyori", name = "adventure-platform-bukkit", version.ref = "adventure-bukkit" } +log4j = { group = "org.apache.logging.log4j", name = "log4j-api", version.ref = "log4j" } # Plugins worldeditCore = { group = "com.sk89q.worldedit", name = "worldedit-core", version.ref = "worldedit" } @@ -35,6 +60,8 @@ worldeditBukkit = { group = "com.sk89q.worldedit", name = "worldedit-bukkit", ve placeholderapi = { group = "me.clip", name = "placeholderapi", version.ref = "placeholderapi" } luckperms = { group = "net.luckperms", name = "api", version.ref = "luckperms" } essentialsx = { group = "net.essentialsx", name = "EssentialsX", version.ref = "essentialsx" } +faweCore = { group = "com.fastasyncworldedit", name = "FastAsyncWorldEdit-Core", version.ref = "fawe" } +faweBukkit = { group = "com.fastasyncworldedit", name = "FastAsyncWorldEdit-Bukkit", version.ref = "fawe" } # Third party prtree = { group = "com.intellectualsites.prtree", name = "PRTree", version.ref = "prtree" } @@ -43,9 +70,17 @@ cloudServices = { group = "cloud.commandframework", name = "cloud-services", ver mvdwapi = { group = "com.intellectualsites.mvdwplaceholderapi", name = "MVdWPlaceholderAPI", version.ref = "mvdwapi" } squirrelid = { group = "org.enginehub", name = "squirrelid", version.ref = "squirrelid" } arkitektonika = { group = "com.intellectualsites.arkitektonika", name = "Arkitektonika-Client", version.ref = "arkitektonika" } +paster = { group = "com.intellectualsites.paster", name = "Paster", version.ref = "paster" } +bstatsBase = { group = "org.bstats", name = "bstats-base", version.ref = "bstats" } +bstatsBukkit = { group = "org.bstats", name = "bstats-bukkit", version.ref = "bstats" } +informativeAnnotations = { group = "com.intellectualsites.informative-annotations", name = "informative-annotations", version.ref = "informative-annotations" } +paperlib = { group = "io.papermc", name = "paperlib", version.ref = "paperlib" } +vault = { group = "com.github.MilkBowl", name = "VaultAPI", version.ref = "vault" } +serverlib = { group = "dev.notmyfault.serverlib", name = "ServerLib", version.ref = "serverlib" } [plugins] shadow = { id = "com.github.johnrengelman.shadow", version.ref = "shadow" } grgit = { id = "org.ajoberstar.grgit", version.ref = "grgit" } spotless = { id = "com.diffplug.spotless", version.ref = "spotless" } nexus = { id = "io.github.gradle-nexus.publish-plugin", version.ref = "nexus" } +runPaper = { id = "xyz.jpenilla.run-paper", version.ref = "runPaper" }