feat(minecraft): Setup logging for older Minecraft/Log4J2 versions
This commit is contained in:
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
[submodule "tweed5-minecraft/vendor/commons-logging"]
|
||||
path = tweed5-minecraft/vendor/commons-logging
|
||||
url = https://gitea.siphalor.de/Siphalor/tweed5-commons-logging.git
|
||||
@@ -12,6 +12,12 @@ val bundledSourcesConfiguration = configurations.resolvable("bundledSources") {
|
||||
}
|
||||
}
|
||||
|
||||
configurations.implementation {
|
||||
exclude(group = "commons-logging", module = "commons-logging")
|
||||
}
|
||||
|
||||
val vendoredCommonsLogging = project.layout.settingsDirectory.file("vendor/commons-logging").asFile
|
||||
|
||||
dependencies {
|
||||
implementation("de.siphalor.tweed5:tweed5-core")
|
||||
implementation("de.siphalor.tweed5:tweed5-attributes-extension")
|
||||
@@ -22,10 +28,35 @@ dependencies {
|
||||
implementation("de.siphalor.tweed5:tweed5-weaver-pojo-presets-extension")
|
||||
implementation("de.siphalor.tweed5:tweed5-weaver-pojo-serde-extension")
|
||||
implementation("de.siphalor.tweed5:tweed5-weaver-pojo-validation-extension")
|
||||
|
||||
implementation(
|
||||
objects.fileCollection().apply {
|
||||
from(
|
||||
vendoredCommonsLogging.resolve("target")
|
||||
.listFiles { it.name.endsWith("SNAPSHOT.jar") }
|
||||
)
|
||||
builtBy("compileCommonsLogging")
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
tasks.register<Exec>("compileCommonsLogging") {
|
||||
inputs.file(vendoredCommonsLogging.resolve("pom.xml"))
|
||||
inputs.dir(vendoredCommonsLogging.resolve("src"))
|
||||
outputs.dir(vendoredCommonsLogging.resolve("target"))
|
||||
commandLine("mvn", "package", "-DskipTests")
|
||||
workingDir(vendoredCommonsLogging)
|
||||
}
|
||||
|
||||
tasks.shadowJar {
|
||||
relocate("org.objectweb.asm", "de.siphalor.tweed5.shadowed.org.objectweb.asm")
|
||||
|
||||
relocate("META-INF", "META-INF/tweed5-vendored/commons-logging") {
|
||||
include("META-INF/*.txt")
|
||||
}
|
||||
exclude("META-INF/maven/**")
|
||||
// Remove some obsolete classes
|
||||
exclude("org/apache/commons/logging/impl/WeakHashtable*")
|
||||
}
|
||||
|
||||
tasks.register<BundledSourcesJar>("sourcesJar") {
|
||||
|
||||
1
tweed5-minecraft/vendor/commons-logging
vendored
Submodule
1
tweed5-minecraft/vendor/commons-logging
vendored
Submodule
Submodule tweed5-minecraft/vendor/commons-logging added at 79058f2a49
Reference in New Issue
Block a user