[build] project structure and publishing improvements

This commit is contained in:
2025-10-12 19:41:11 +02:00
parent 61485e3134
commit ff53708a16
12 changed files with 68 additions and 28 deletions

View File

@@ -1,9 +1,16 @@
plugins {
`maven-publish`
id("de.siphalor.tweed5.base-module")
id("de.siphalor.tweed5.publishing")
id("de.siphalor.tweed5.minecraft.mod.dummy")
}
val bundledSourcesConfiguration = configurations.resolvable("bundledSources") {
extendsFrom(configurations.implementation.get())
isTransitive = true
attributes {
attribute(DocsType.DOCS_TYPE_ATTRIBUTE, objects.named(DocsType.SOURCES))
}
}
dependencies {
implementation(project(":tweed5-core"))
implementation(project(":tweed5-attributes-extension"))
@@ -18,3 +25,13 @@ dependencies {
tasks.shadowJar {
relocate("org.objectweb.asm", "de.siphalor.tweed5.shadowed.org.objectweb.asm")
}
tasks.register<Jar>("sourcesJar") {
inputs.files(bundledSourcesConfiguration)
from(
bundledSourcesConfiguration.get().resolve()
.filter { it.name.startsWith(rootProject.name) }
.map { zipTree(it) }
)
archiveClassifier.set("sources")
}