[build] project structure and publishing improvements
This commit is contained in:
@@ -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")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user