Skip to content

Commit

Permalink
Extract log4j version to Versions.kt.
Browse files Browse the repository at this point in the history
Also bump to match underlying platform versions to resolve runtime
version mismatches.
  • Loading branch information
wizjany committed Dec 12, 2021
1 parent 2c0b47d commit 20c42b5
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 11 deletions.
1 change: 1 addition & 0 deletions buildSrc/src/main/kotlin/Versions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion worldedit-bukkit/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion worldedit-cli/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
6 changes: 3 additions & 3 deletions worldedit-core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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") {
Expand Down
4 changes: 2 additions & 2 deletions worldedit-fabric/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
4 changes: 2 additions & 2 deletions worldedit-forge/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
4 changes: 2 additions & 2 deletions worldedit-sponge/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 20c42b5

Please sign in to comment.