Extract log4j version to Versions.kt.

Also bump to match underlying platform versions to resolve runtime
version mismatches.
This commit is contained in:
wizjany 2021-12-12 18:49:32 -05:00
parent 2c0b47d7db
commit 20c42b51c8
No known key found for this signature in database
GPG Key ID: 1DB5861C03B76B5E
7 changed files with 12 additions and 11 deletions

View File

@ -10,6 +10,7 @@ object Versions {
const val FAST_UTIL = "8.5.6"
const val GUAVA = "31.0.1-jre"
const val GSON = "2.8.8"
const val LOG4J = "2.15.0"
}
// Properties that need a project reference to resolve:

View File

@ -40,7 +40,7 @@ dependencies {
exclude("junit", "junit")
}
"localImplementation"(platform("org.apache.logging.log4j:log4j-bom:2.14.1") {
"localImplementation"(platform("org.apache.logging.log4j:log4j-bom:${Versions.LOG4J}") {
because("Spigot provides Log4J (sort of, not in API, implicitly part of server)")
})
"localImplementation"("org.apache.logging.log4j:log4j-api")

View File

@ -19,7 +19,7 @@ dependencies {
"annotationProcessor"(project(":worldedit-libs:core:ap"))
"annotationProcessor"("com.google.guava:guava:${Versions.GUAVA}")
"api"(project(":worldedit-core"))
"implementation"(platform("org.apache.logging.log4j:log4j-bom:2.14.1") {
"implementation"(platform("org.apache.logging.log4j:log4j-bom:${Versions.LOG4J}") {
because("We control Log4J on this platform")
})
"implementation"("org.apache.logging.log4j:log4j-api")

View File

@ -42,8 +42,8 @@ dependencies {
"implementation"("com.google.code.findbugs:jsr305:1.3.9")
"implementation"("com.google.code.gson:gson")
"implementation"("org.apache.logging.log4j:log4j-api:2.14.1") {
because("Mojang provides Log4J 2.14.1")
"implementation"("org.apache.logging.log4j:log4j-api:${Versions.LOG4J}") {
because("Mojang provides Log4J")
}
"implementation"("it.unimi.dsi:fastutil")
@ -61,7 +61,7 @@ dependencies {
"languageFiles"("${project.group}:worldedit-lang:7.2.6:355@zip")
"testRuntimeOnly"("org.apache.logging.log4j:log4j-core:2.14.1")
"testRuntimeOnly"("org.apache.logging.log4j:log4j-core:${Versions.LOG4J}")
}
tasks.named<Test>("test") {

View File

@ -39,8 +39,8 @@ repositories {
dependencies {
"api"(project(":worldedit-core"))
"implementation"(platform("org.apache.logging.log4j:log4j-bom:2.14.1") {
because("Mojang provides Log4J at 2.14.1")
"implementation"(platform("org.apache.logging.log4j:log4j-bom:${Versions.LOG4J}") {
because("Mojang provides Log4J")
})
"minecraft"("com.mojang:minecraft:$minecraftVersion")

View File

@ -24,8 +24,8 @@ val apiClasspath = configurations.create("apiClasspath") {
dependencies {
"api"(project(":worldedit-core"))
"implementation"(platform("org.apache.logging.log4j:log4j-bom:2.14.1") {
because("Mojang provides Log4J at 2.14.1")
"implementation"(platform("org.apache.logging.log4j:log4j-bom:${Versions.LOG4J}") {
because("Mojang provides Log4J")
})
"minecraft"("net.minecraftforge:forge:$minecraftVersion-$forgeVersion")

View File

@ -23,8 +23,8 @@ dependencies {
api("org.spongepowered:spongeapi:7.1.0") {
exclude(group = "org.slf4j", module = "slf4j-api")
}
implementation(platform("org.apache.logging.log4j:log4j-bom:2.14.1") {
because("Sponge 8 (will?) provides Log4J at 2.14.1")
implementation(platform("org.apache.logging.log4j:log4j-bom:${Versions.LOG4J}") {
because("Sponge 8 (will?) provides Log4J")
})
api("org.apache.logging.log4j:log4j-api")
api("org.bstats:bstats-sponge:1.7")