[build] Restructure to composite build

This commit is contained in:
2025-10-26 02:03:53 +02:00
parent 0e3990aed9
commit 1fbc97866c
348 changed files with 126 additions and 64 deletions

View File

@@ -0,0 +1,7 @@
plugins {
`maven-publish`
id("de.siphalor.tweed5.root-properties")
}
group = "de.siphalor.tweed5.minecraft"
version = project.property("tweed5.version").toString()

View File

@@ -0,0 +1,37 @@
plugins {
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("de.siphalor.tweed5:tweed5-core")
implementation("de.siphalor.tweed5:tweed5-attributes-extension")
implementation("de.siphalor.tweed5:tweed5-default-extensions")
implementation("de.siphalor.tweed5:tweed5-serde-extension")
implementation("de.siphalor.tweed5:tweed5-weaver-pojo")
implementation("de.siphalor.tweed5:tweed5-weaver-pojo-attributes-extension")
implementation("de.siphalor.tweed5:tweed5-weaver-pojo-serde-extension")
implementation("de.siphalor.tweed5:tweed5-weaver-pojo-validation-extension")
}
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")
}

View File

@@ -0,0 +1,3 @@
module.name = Tweed 5 Bundle
module.description = Bundle of pre-packaged Tweed modules \
that are usually required for your Minecraft mod config needs.

View File

@@ -0,0 +1,37 @@
{
"schemaVersion": 1,
"license": "LGPL-3.0-only",
"contact": {
"email": "info@siphalor.de",
"issues": "https://gitea.siphalor.de/Siphalor/tweed5/issues",
"sources": "https://gitea.siphalor.de/Siphalor/tweed5"
},
"custom": {
"modmenu": {
"badges": [
"library"
],
"links": {
"modmenu.discord": "https://discord.gg/6gaXmbj"
},
"parent": {
"id": "tweed5",
"name": "Tweed 5",
"description": "Configuration focused libraries",
"icon": "assets/tweed4_base/icon.png",
"badges": [
"library"
]
}
},
"modmenu:api": true
},
"icon": "assets/tweed5/icon.png",
"id": "${id}",
"name": "${name}",
"description": "${description}",
"authors": [
"Siphalor"
],
"version": "${version}"
}

View File

@@ -0,0 +1,29 @@
rootProject.name = "tweed5-minecraft"
pluginManagement {
includeBuild("../conventions")
}
dependencyResolutionManagement {
repositories {
mavenCentral()
}
versionCatalogs {
create("libs") {
from(files("../gradle/libs.versions.toml"))
}
}
}
includeBuild("../tweed5")
includeNormalModule("bundle")
fun includeNormalModule(name: String) {
includeAs("tweed5-$name", "$name")
}
fun includeAs(name: String, path: String) {
include(name)
project(":$name").projectDir = file(path)
}