[build] Restructure to composite build
This commit is contained in:
7
tweed5-minecraft/build.gradle.kts
Normal file
7
tweed5-minecraft/build.gradle.kts
Normal 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()
|
||||
37
tweed5-minecraft/bundle/build.gradle.kts
Normal file
37
tweed5-minecraft/bundle/build.gradle.kts
Normal 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")
|
||||
}
|
||||
3
tweed5-minecraft/bundle/gradle.properties
Normal file
3
tweed5-minecraft/bundle/gradle.properties
Normal 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.
|
||||
37
tweed5-minecraft/mod-template/resources/fabric.mod.json
Normal file
37
tweed5-minecraft/mod-template/resources/fabric.mod.json
Normal 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}"
|
||||
}
|
||||
29
tweed5-minecraft/settings.gradle.kts
Normal file
29
tweed5-minecraft/settings.gradle.kts
Normal 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)
|
||||
}
|
||||
Reference in New Issue
Block a user