feat(minecraft): Make every subproject its own mod

This commit is contained in:
2025-11-08 00:44:52 +01:00
parent 47ad406560
commit d2dada2b77
34 changed files with 186 additions and 65 deletions

View File

@@ -0,0 +1,32 @@
plugins {
id("de.siphalor.tweed5.minecraft.mod.dummy")
}
val vendoredCommonsLogging = project.layout.settingsDirectory.file("vendor/commons-logging").asFile
dependencies {
shadowOnly(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("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*")
}