Improve a few dependency scopes

This commit is contained in:
NotMyFault 2021-09-22 23:00:12 +02:00
parent 40b024fbba
commit a5795461f2
No known key found for this signature in database
GPG Key ID: 158F5701A6AAD00C
3 changed files with 24 additions and 16 deletions

View File

@ -47,6 +47,12 @@ configurations.all {
} }
} }
val localImplementation = configurations.create("localImplementation") {
description = "Dependencies used locally, but provided by the runtime Bukkit implementation"
isCanBeConsumed = false
isCanBeResolved = false
}
dependencies { dependencies {
// Modules // Modules
api(projects.worldeditCore) api(projects.worldeditCore)
@ -56,14 +62,14 @@ dependencies {
implementation(libs.fastutil) implementation(libs.fastutil)
// Platform expectations // Platform expectations
api(libs.paper) { 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
implementation(libs.log4j) localImplementation(libs.log4j)
implementation(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)")
} }
@ -78,17 +84,19 @@ dependencies {
exclude("com.sk89q.worldedit.worldedit-libs", "bukkit") exclude("com.sk89q.worldedit.worldedit-libs", "bukkit")
exclude("com.sk89q.worldedit.worldedit-libs", "core") exclude("com.sk89q.worldedit.worldedit-libs", "core")
} }
implementation(libs.mapmanager) { isTransitive = false } compileOnly(libs.mapmanager) { isTransitive = false }
implementation(libs.griefprevention) { isTransitive = false } compileOnly(libs.griefprevention) { isTransitive = false }
implementation(libs.griefdefender) { isTransitive = false } compileOnly(libs.griefdefender) { isTransitive = false }
implementation(libs.mcore) { isTransitive = false } compileOnly(libs.mcore) { isTransitive = false }
implementation(libs.residence) { isTransitive = false } compileOnly(libs.residence) { isTransitive = false }
compileOnly(libs.towny) { isTransitive = false } compileOnly(libs.towny) { isTransitive = false }
implementation(libs.protocollib) { isTransitive = false } compileOnly(libs.protocollib) { isTransitive = false }
api(libs.plotsquaredV6Bukkit) { isTransitive = false } compileOnly(libs.plotsquaredV6Bukkit) { isTransitive = false }
compileOnly(libs.plotsquaredV6Core) { isTransitive = false }
compileOnly(libs.plotsquaredV4) { isTransitive = false }
// Third party // Third party
implementation(libs.flowmath) { compileOnly(libs.flowmath) {
because("This dependency is needed by GriefDefender but not exposed transitively.") because("This dependency is needed by GriefDefender but not exposed transitively.")
isTransitive = false isTransitive = false
} }
@ -98,7 +106,7 @@ dependencies {
implementation(libs.serverlib) implementation(libs.serverlib)
api(libs.paster) api(libs.paster)
api(libs.lz4Java) api(libs.lz4Java)
api(libs.lz4JavaStream) { isTransitive = false } runtimeOnly(libs.lz4JavaStream) { isTransitive = false }
api(libs.sparsebitset) { isTransitive = false } api(libs.sparsebitset) { isTransitive = false }
api(libs.parallelgzip) { isTransitive = false } api(libs.parallelgzip) { isTransitive = false }
compileOnly(libs.adventure) compileOnly(libs.adventure)

View File

@ -37,8 +37,8 @@ dependencies {
// Plugins // Plugins
compileOnly(libs.redprotect) compileOnly(libs.redprotect)
api(libs.plotsquaredV4) { isTransitive = false } compileOnly(libs.plotsquaredV4) { isTransitive = false }
api(libs.plotsquaredV6Core) { isTransitive = false } compileOnly(libs.plotsquaredV6Core) { 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)
@ -46,7 +46,7 @@ dependencies {
annotationProcessor(libs.autoValue) annotationProcessor(libs.autoValue)
// Third party // Third party
implementation(libs.truezip) compileOnly(libs.truezip)
implementation(libs.findbugs) implementation(libs.findbugs)
implementation(libs.rhino) implementation(libs.rhino)
compileOnly(libs.adventure) compileOnly(libs.adventure)