Cleanup dependencies

This commit is contained in:
Alexander Brandes 2023-08-09 20:52:18 +02:00
parent 50e45f07f0
commit e81980651e
No known key found for this signature in database
GPG Key ID: 158F5701A6AAD00C
11 changed files with 86 additions and 39 deletions

View File

@ -15,7 +15,6 @@ fun Project.applyPaperweightAdapterConfiguration() {
dependencies { dependencies {
"implementation"(project(":worldedit-bukkit")) "implementation"(project(":worldedit-bukkit"))
"implementation"(platform("com.intellectualsites.bom:bom-newest:1.33"))
} }
tasks.named("assemble") { tasks.named("assemble") {

View File

@ -40,12 +40,11 @@ fun Project.applyCommonJavaConfiguration(sourcesJar: Boolean, banSlf4j: Boolean
dependencies { dependencies {
"compileOnly"("com.google.code.findbugs:jsr305:3.0.2") "compileOnly"("com.google.code.findbugs:jsr305:3.0.2")
"testImplementation"("org.junit.jupiter:junit-jupiter-api:5.9.2") "testImplementation"("org.junit.jupiter:junit-jupiter-api:5.10.0")
"testImplementation"("org.junit.jupiter:junit-jupiter-params:5.9.2") "testImplementation"("org.junit.jupiter:junit-jupiter-params:5.10.0")
"testImplementation"("org.mockito:mockito-core:5.1.1") "testImplementation"("org.mockito:mockito-core:5.4.0")
"testImplementation"("org.mockito:mockito-junit-jupiter:5.1.1") "testImplementation"("org.mockito:mockito-junit-jupiter:5.4.0")
"testRuntimeOnly"("org.junit.jupiter:junit-jupiter-engine:5.9.2") "testRuntimeOnly"("org.junit.jupiter:junit-jupiter-engine:5.10.0")
"implementation"(platform("com.intellectualsites.bom:bom-newest:1.33"))
} }
// Java 8 turns on doclint which we fail // Java 8 turns on doclint which we fail

View File

@ -1,8 +1,11 @@
[versions] [versions]
# Minecraft expectations # Minecraft expectations
paper = "1.20.1-R0.1-SNAPSHOT"
fastutil = "8.5.9" fastutil = "8.5.9"
guava = "31.1-jre" guava = "31.1-jre"
log4j = "2.19.0" log4j = "2.19.0"
gson = "2.10"
snakeyaml = "2.0"
# Plugins # Plugins
dummypermscompat = "1.10" dummypermscompat = "1.10"
@ -12,12 +15,15 @@ griefprevention = "16.18.1"
griefdefender = "2.1.0-SNAPSHOT" griefdefender = "2.1.0-SNAPSHOT"
residence = "4.5._13.1" residence = "4.5._13.1"
towny = "0.99.5.7" towny = "0.99.5.7"
plotsquared = "7.0.0-rc.4"
# Third party # Third party
bstats = "3.0.2" bstats = "3.0.2"
sparsebitset = "1.2" sparsebitset = "1.2"
parallelgzip = "1.0.5" parallelgzip = "1.0.5"
adventure = "4.14.0" adventure = "4.14.0"
adventure-bukkit = "4.3.0"
checkerqual = "3.37.0"
truezip = "6.8.4" truezip = "6.8.4"
auto-value = "1.10.2" auto-value = "1.10.2"
findbugs = "3.0.2" findbugs = "3.0.2"
@ -29,6 +35,11 @@ jlibnoise = "1.0.0"
jchronic = "0.2.4a" jchronic = "0.2.4a"
lz4-java = "1.8.0" lz4-java = "1.8.0"
lz4-stream = "1.0.0" lz4-stream = "1.0.0"
commons-cli = "1.5.0"
paperlib = "1.0.8"
paster = "1.1.5"
vault = "1.7.1"
serverlib = "2.3.1"
## Internal ## Internal
text-adapter = "3.0.6" text-adapter = "3.0.6"
text = "3.0.4" text = "3.0.4"
@ -39,12 +50,17 @@ mockito = "5.4.0"
# Gradle plugins # Gradle plugins
pluginyml = "0.6.0" pluginyml = "0.6.0"
minotaur = "2.8.3"
[libraries] [libraries]
# Minecraft expectations # Minecraft expectations
paper = { group = "io.papermc.paper", name = "paper-api", version.ref = "paper" }
fastutil = { group = "it.unimi.dsi", name = "fastutil", version.ref = "fastutil" } fastutil = { group = "it.unimi.dsi", name = "fastutil", version.ref = "fastutil" }
log4jBom = { group = "org.apache.logging.log4j", name = "log4j-bom", version.ref = "log4j" } log4jBom = { group = "org.apache.logging.log4j", name = "log4j-bom", version.ref = "log4j" }
log4jApi = { group = "org.apache.logging.log4j", name = "log4j-api", version.ref = "log4j" }
guava = { group = "com.google.guava", name = "guava", version.ref = "guava" } guava = { group = "com.google.guava", name = "guava", version.ref = "guava" }
gson = { group = "com.google.code.gson", name = "gson", version.ref = "gson" }
snakeyaml = { group = "org.yaml", name = "snakeyaml", version.ref = "snakeyaml" }
# Plugins # Plugins
dummypermscompat = { group = "com.sk89q", name = "dummypermscompat", version.ref = "dummypermscompat" } dummypermscompat = { group = "com.sk89q", name = "dummypermscompat", version.ref = "dummypermscompat" }
@ -54,9 +70,12 @@ griefprevention = { group = "com.github.TechFortress", name = "GriefPrevention",
griefdefender = { group = "com.griefdefender", name = "api", version.ref = "griefdefender" } griefdefender = { group = "com.griefdefender", name = "api", version.ref = "griefdefender" }
residence = { group = "com.bekvon.bukkit.residence", name = "Residence", version.ref = "residence" } residence = { group = "com.bekvon.bukkit.residence", name = "Residence", version.ref = "residence" }
towny = { group = "com.palmergames.bukkit.towny", name = "towny", version.ref = "towny" } towny = { group = "com.palmergames.bukkit.towny", name = "towny", version.ref = "towny" }
plotSquaredCore = { group = "com.intellectualsites.plotsquared", name = "plotsquared-core", version.ref = "plotsquared" }
plotSquaredBukkit = { group = "com.intellectualsites.plotsquared", name = "plotsquared-bukkit", version.ref = "plotsquared" }
# Third Party # Third Party
bstatsBase = { group = "org.bstats", name = "bstats-base", version.ref = "bstats" } bstatsBase = { group = "org.bstats", name = "bstats-base", version.ref = "bstats" }
bstatsBukkit = { group = "org.bstats", name = "bstats-bukkit", version.ref = "bstats" }
sparsebitset = { group = "com.zaxxer", name = "SparseBitSet", version.ref = "sparsebitset" } sparsebitset = { group = "com.zaxxer", name = "SparseBitSet", version.ref = "sparsebitset" }
parallelgzip = { group = "org.anarres", name = "parallelgzip", version.ref = "parallelgzip" } parallelgzip = { group = "org.anarres", name = "parallelgzip", version.ref = "parallelgzip" }
adventureNbt = { group = "net.kyori", name = "adventure-nbt", version.ref = "adventure" } adventureNbt = { group = "net.kyori", name = "adventure-nbt", version.ref = "adventure" }
@ -73,6 +92,15 @@ jlibnoise = { group = "com.sk89q.lib", name = "jlibnoise", version.ref = "jlibno
jchronic = { group = "com.sk89q", name = "jchronic", version.ref = "jchronic" } jchronic = { group = "com.sk89q", name = "jchronic", version.ref = "jchronic" }
lz4Java = { group = "org.lz4", name = "lz4-java", version.ref = "lz4-java" } lz4Java = { group = "org.lz4", name = "lz4-java", version.ref = "lz4-java" }
lz4JavaStream = { group = "net.jpountz", name = "lz4-java-stream", version.ref = "lz4-stream" } lz4JavaStream = { group = "net.jpountz", name = "lz4-java-stream", version.ref = "lz4-stream" }
commonsCli = { group = "commons-cli", name = "commons-cli", version.ref = "commons-cli" }
paperlib = { group = "io.papermc", name = "paperlib", version.ref = "paperlib" }
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" }
paster = { group = "com.intellectualsites.paster", name = "Paster", version.ref = "paster" }
vault = { group = "com.github.MilkBowl", name = "VaultAPI", version.ref = "vault" }
serverlib = { group = "dev.notmyfault.serverlib", name = "ServerLib", version.ref = "serverlib" }
checkerqual = { group = "org.checkerframework", name = "checker-qual", version.ref = "checkerqual" }
# Internal # Internal
## Text ## Text
@ -94,3 +122,4 @@ log4jCore = { group = "org.apache.logging.log4j", name = "log4j-core", version.r
[plugins] [plugins]
pluginyml = { id = "net.minecrell.plugin-yml.bukkit", version.ref = "pluginyml" } pluginyml = { id = "net.minecrell.plugin-yml.bukkit", version.ref = "pluginyml" }
minotaur = { id = "com.modrinth.minotaur", version.ref = "minotaur" }

View File

@ -22,5 +22,5 @@ configurations.all {
dependencies { dependencies {
the<PaperweightUserDependenciesExtension>().paperDevBundle("1.17.1-R0.1-20220414.034903-210") the<PaperweightUserDependenciesExtension>().paperDevBundle("1.17.1-R0.1-20220414.034903-210")
compileOnly("io.papermc:paperlib") compileOnly(libs.paperlib)
} }

View File

@ -13,5 +13,5 @@ repositories {
dependencies { dependencies {
// https://papermc.io/repo/service/rest/repository/browse/maven-public/io/papermc/paper/dev-bundle/ // https://papermc.io/repo/service/rest/repository/browse/maven-public/io/papermc/paper/dev-bundle/
the<PaperweightUserDependenciesExtension>().paperDevBundle("1.18.2-R0.1-20220920.010157-167") the<PaperweightUserDependenciesExtension>().paperDevBundle("1.18.2-R0.1-20220920.010157-167")
compileOnly("io.papermc:paperlib") compileOnly(libs.paperlib)
} }

View File

@ -12,5 +12,5 @@ repositories {
dependencies { dependencies {
the<PaperweightUserDependenciesExtension>().paperDevBundle("1.19.4-R0.1-20230608.201059-104") the<PaperweightUserDependenciesExtension>().paperDevBundle("1.19.4-R0.1-20230608.201059-104")
compileOnly("io.papermc:paperlib") compileOnly(libs.paperlib)
} }

View File

@ -13,5 +13,5 @@ repositories {
dependencies { dependencies {
// https://repo.papermc.io/service/rest/repository/browse/maven-public/io/papermc/paper/dev-bundle/ // https://repo.papermc.io/service/rest/repository/browse/maven-public/io/papermc/paper/dev-bundle/
the<PaperweightUserDependenciesExtension>().paperDevBundle("1.20.1-R0.1-20230623.105806-29") the<PaperweightUserDependenciesExtension>().paperDevBundle("1.20.1-R0.1-20230623.105806-29")
compileOnly("io.papermc:paperlib") compileOnly(libs.paperlib)
} }

View File

@ -3,7 +3,7 @@ import io.papermc.paperweight.userdev.attribute.Obfuscation
plugins { plugins {
`java-library` `java-library`
id("com.modrinth.minotaur") version "2.8.3" alias(libs.plugins.minotaur)
} }
project.description = "Bukkit" project.description = "Bukkit"
@ -74,19 +74,19 @@ dependencies {
implementation(libs.fastutil) implementation(libs.fastutil)
// Platform expectations // Platform expectations
compileOnly("io.papermc.paper:paper-api") { compileOnly(libs.paper) {
exclude("junit", "junit") exclude("junit", "junit")
exclude(group = "org.slf4j", module = "slf4j-api") exclude(group = "org.slf4j", module = "slf4j-api")
} }
// Logging // Logging
localImplementation("org.apache.logging.log4j:log4j-api") localImplementation(libs.log4jApi)
localImplementation(libs.log4jBom) { localImplementation(libs.log4jBom) {
because("Spigot provides Log4J (sort of, not in API, implicitly part of server)") because("Spigot provides Log4J (sort of, not in API, implicitly part of server)")
} }
// Plugins // Plugins
compileOnly("com.github.MilkBowl:VaultAPI") { isTransitive = false } compileOnly(libs.vault) { isTransitive = false }
compileOnly(libs.dummypermscompat) { compileOnly(libs.dummypermscompat) {
exclude("com.github.MilkBowl", "VaultAPI") exclude("com.github.MilkBowl", "VaultAPI")
} }
@ -101,26 +101,26 @@ dependencies {
compileOnly(libs.griefdefender) { isTransitive = false } compileOnly(libs.griefdefender) { isTransitive = false }
compileOnly(libs.residence) { isTransitive = false } compileOnly(libs.residence) { isTransitive = false }
compileOnly(libs.towny) { isTransitive = false } compileOnly(libs.towny) { isTransitive = false }
compileOnly("com.intellectualsites.plotsquared:plotsquared-bukkit") { isTransitive = false } compileOnly(libs.plotSquaredBukkit) { isTransitive = false }
compileOnly("com.intellectualsites.plotsquared:plotsquared-core") { isTransitive = false } compileOnly(libs.plotSquaredCore) { isTransitive = false }
// Third party // Third party
implementation("io.papermc:paperlib") implementation(libs.paperlib)
implementation("org.bstats:bstats-bukkit") { isTransitive = false } implementation(libs.bstatsBukkit) { isTransitive = false }
implementation(libs.bstatsBase) { isTransitive = false } implementation(libs.bstatsBase) { isTransitive = false }
implementation("dev.notmyfault.serverlib:ServerLib") implementation(libs.serverlib)
implementation("com.intellectualsites.paster:Paster") { isTransitive = false } implementation(libs.paster) { isTransitive = false }
api(libs.lz4Java) { isTransitive = false } api(libs.lz4Java) { isTransitive = false }
api(libs.sparsebitset) { isTransitive = false } api(libs.sparsebitset) { isTransitive = false }
api(libs.parallelgzip) { isTransitive = false } api(libs.parallelgzip) { isTransitive = false }
compileOnly("net.kyori:adventure-api") compileOnly(libs.adventureApi)
compileOnlyApi("org.checkerframework:checker-qual") compileOnlyApi(libs.checkerqual)
// Tests // Tests
testImplementation(libs.mockito) testImplementation(libs.mockito)
testImplementation("net.kyori:adventure-api") testImplementation(libs.adventureApi)
testImplementation("org.checkerframework:checker-qual") testImplementation(libs.checkerqual)
testImplementation("io.papermc.paper:paper-api") { isTransitive = true } testImplementation(libs.paper) { isTransitive = true }
} }
tasks.named<Copy>("processResources") { tasks.named<Copy>("processResources") {

View File

@ -36,6 +36,8 @@ import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable; import org.jetbrains.annotations.Nullable;
import javax.annotation.Nonnull; import javax.annotation.Nonnull;
import java.time.Duration;
import java.time.Instant;
import java.util.Date; import java.util.Date;
import java.util.HashMap; import java.util.HashMap;
import java.util.HashSet; import java.util.HashSet;
@ -161,6 +163,24 @@ public class TestOfflinePermissible implements OfflinePlayer, Permissible {
throw new UnsupportedOperationException("Not supported yet."); throw new UnsupportedOperationException("Not supported yet.");
} }
@Override
public <E extends BanEntry<? super PlayerProfile>> @Nullable E ban(
@Nullable final String reason,
@Nullable final Instant expires,
@Nullable final String source
) {
return null;
}
@Override
public <E extends BanEntry<? super PlayerProfile>> @Nullable E ban(
@Nullable final String reason,
@Nullable final Duration duration,
@Nullable final String source
) {
return null;
}
@Override @Override
public @Nullable BanEntry<org.bukkit.profile.PlayerProfile> ban( public @Nullable BanEntry<org.bukkit.profile.PlayerProfile> ban(
@Nullable final String reason, @Nullable final String reason,

View File

@ -27,16 +27,16 @@ dependencies {
// Minecraft expectations // Minecraft expectations
annotationProcessor(libs.guava) annotationProcessor(libs.guava)
implementation("com.google.guava:guava") implementation(libs.guava)
implementation("com.google.code.gson:gson") implementation(libs.gson)
// Logging // Logging
implementation(libs.log4jBom) { implementation(libs.log4jBom) {
because("We control Log4J on this platform") because("We control Log4J on this platform")
} }
implementation("org.apache.logging.log4j:log4j-api") implementation(libs.log4jApi)
implementation(libs.log4jCore) implementation(libs.log4jCore)
implementation("commons-cli:commons-cli:1.5.0") implementation(libs.commonsCli)
api(libs.parallelgzip) { isTransitive = false } api(libs.parallelgzip) { isTransitive = false }
api(libs.lz4Java) api(libs.lz4Java)
} }

View File

@ -11,7 +11,7 @@ applyPlatformAndCoreConfiguration()
dependencies { dependencies {
constraints { constraints {
implementation("org.yaml:snakeyaml") { implementation(libs.snakeyaml) {
version { strictly("2.0") } version { strictly("2.0") }
because("Bukkit provides SnakeYaml") because("Bukkit provides SnakeYaml")
} }
@ -24,17 +24,17 @@ dependencies {
// Minecraft expectations // Minecraft expectations
implementation(libs.fastutil) implementation(libs.fastutil)
implementation("com.google.guava:guava") implementation(libs.guava)
implementation("com.google.code.gson:gson") implementation(libs.gson)
// Platform expectations // Platform expectations
implementation("org.yaml:snakeyaml") implementation(libs.snakeyaml)
// Logging // Logging
implementation("org.apache.logging.log4j:log4j-api") implementation(libs.log4jApi)
// Plugins // Plugins
compileOnly("com.intellectualsites.plotsquared:plotsquared-core") { isTransitive = false } compileOnly(libs.plotSquaredCore) { isTransitive = false }
// ensure this is on the classpath for the AP // ensure this is on the classpath for the AP
annotationProcessor(libs.guava) annotationProcessor(libs.guava)
@ -45,11 +45,11 @@ dependencies {
compileOnly(libs.truezip) compileOnly(libs.truezip)
implementation(libs.findbugs) implementation(libs.findbugs)
implementation(libs.rhino) implementation(libs.rhino)
compileOnly("net.kyori:adventure-api") compileOnly(libs.adventureApi)
compileOnlyApi(libs.adventureNbt) compileOnlyApi(libs.adventureNbt)
compileOnlyApi("net.kyori:adventure-text-minimessage") compileOnlyApi(libs.adventureMiniMessage)
implementation(libs.zstd) { isTransitive = false } implementation(libs.zstd) { isTransitive = false }
compileOnly("com.intellectualsites.paster:Paster") compileOnly(libs.paster)
compileOnly(libs.lz4Java) { isTransitive = false } compileOnly(libs.lz4Java) { isTransitive = false }
compileOnly(libs.sparsebitset) compileOnly(libs.sparsebitset)
compileOnly(libs.parallelgzip) { isTransitive = false } compileOnly(libs.parallelgzip) { isTransitive = false }