build(minecraft): Use new logo in Minecraft mods
This commit is contained in:
@@ -14,3 +14,47 @@ tasks.shadowJar {
|
|||||||
relocate("org.apache.commons", "de.siphalor.tweed5.shadowed.org.apache.commons")
|
relocate("org.apache.commons", "de.siphalor.tweed5.shadowed.org.apache.commons")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tasks.register<Sync>("processMinecraftModResources") {
|
||||||
|
inputs.property("id", project.name)
|
||||||
|
inputs.property("version", project.version)
|
||||||
|
inputs.property("name", properties["module.name"])
|
||||||
|
inputs.property("description", properties["module.description"])
|
||||||
|
inputs.property("repoUrl", properties["git.url"])
|
||||||
|
|
||||||
|
from(project.layout.settingsDirectory.dir("../tweed5-minecraft/mod-template/resources")) {
|
||||||
|
expand(
|
||||||
|
mapOf(
|
||||||
|
"id" to project.name.replace('-', '_'),
|
||||||
|
"version" to project.version,
|
||||||
|
"name" to properties["module.name"],
|
||||||
|
"description" to properties["module.description"],
|
||||||
|
"repoUrl" to properties["git.url"],
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
from(project.layout.settingsDirectory.file("../images/logo-48.png")) {
|
||||||
|
into("assets/tweed5")
|
||||||
|
}
|
||||||
|
into(project.layout.buildDirectory.dir("minecraftModResources"))
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.register<Sync>("processMinecraftTestmodResources") {
|
||||||
|
inputs.property("id", project.name)
|
||||||
|
inputs.property("version", project.version)
|
||||||
|
inputs.property("name", properties["module.name"])
|
||||||
|
inputs.property("description", properties["module.description"])
|
||||||
|
inputs.property("repoUrl", properties["git.url"])
|
||||||
|
|
||||||
|
from(project.layout.settingsDirectory.dir("../tweed5-minecraft/mod-template/resources")) {
|
||||||
|
expand(
|
||||||
|
mapOf(
|
||||||
|
"id" to "${project.name.replace('-', '_')}_testmod",
|
||||||
|
"version" to project.version,
|
||||||
|
"name" to "${properties["module.name"]} (test mod)",
|
||||||
|
"description" to properties["module.description"],
|
||||||
|
"repoUrl" to properties["git.url"],
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
into(project.layout.buildDirectory.dir("minecraftTestmodResources"))
|
||||||
|
}
|
||||||
|
|||||||
@@ -4,29 +4,11 @@ plugins {
|
|||||||
id("de.siphalor.tweed5.minecraft.mod.base")
|
id("de.siphalor.tweed5.minecraft.mod.base")
|
||||||
}
|
}
|
||||||
|
|
||||||
val processMinecraftModResources = tasks.register<Sync>("processMinecraftModResources") {
|
|
||||||
inputs.property("id", project.name)
|
|
||||||
inputs.property("version", project.version)
|
|
||||||
inputs.property("name", properties["module.name"])
|
|
||||||
inputs.property("description", properties["module.description"])
|
|
||||||
inputs.property("repoUrl", properties["git.url"])
|
|
||||||
|
|
||||||
from(project.layout.settingsDirectory.dir("../tweed5-minecraft/mod-template/resources"))
|
|
||||||
expand(mapOf(
|
|
||||||
"id" to project.name.replace('-', '_'),
|
|
||||||
"version" to project.version,
|
|
||||||
"name" to properties["module.name"],
|
|
||||||
"description" to properties["module.description"],
|
|
||||||
"repoUrl" to properties["git.url"],
|
|
||||||
))
|
|
||||||
into(project.layout.buildDirectory.dir("minecraftModResources"))
|
|
||||||
}
|
|
||||||
|
|
||||||
val minecraftModJar = tasks.register<Jar>("minecraftModJar") {
|
val minecraftModJar = tasks.register<Jar>("minecraftModJar") {
|
||||||
group = LifecycleBasePlugin.BUILD_GROUP
|
group = LifecycleBasePlugin.BUILD_GROUP
|
||||||
|
|
||||||
dependsOn(tasks.shadowJar)
|
dependsOn(tasks.shadowJar)
|
||||||
dependsOn(processMinecraftModResources)
|
dependsOn(tasks.named("processMinecraftModResources"))
|
||||||
|
|
||||||
from(zipTree(tasks.shadowJar.get().archiveFile))
|
from(zipTree(tasks.shadowJar.get().archiveFile))
|
||||||
from(project.layout.buildDirectory.dir("minecraftModResources"))
|
from(project.layout.buildDirectory.dir("minecraftModResources"))
|
||||||
@@ -41,7 +23,7 @@ val minecraftModSourcesJar = tasks.register<Jar>("minecraftModSourcesJar") {
|
|||||||
group = LifecycleBasePlugin.BUILD_GROUP
|
group = LifecycleBasePlugin.BUILD_GROUP
|
||||||
|
|
||||||
dependsOn(tasks.named("sourcesJar"))
|
dependsOn(tasks.named("sourcesJar"))
|
||||||
dependsOn(processMinecraftModResources)
|
dependsOn(tasks.named("processMinecraftModResources"))
|
||||||
|
|
||||||
from(tasks.named<Jar>("sourcesJar").get().archiveFile.map {
|
from(tasks.named<Jar>("sourcesJar").get().archiveFile.map {
|
||||||
if (it.asFile.exists()) {
|
if (it.asFile.exists()) {
|
||||||
|
|||||||
@@ -140,40 +140,16 @@ afterEvaluate {
|
|||||||
}
|
}
|
||||||
|
|
||||||
tasks.named<Copy>("processResources") {
|
tasks.named<Copy>("processResources") {
|
||||||
inputs.property("id", project.name)
|
val processMinecraftModResources = tasks.named<Sync>("processMinecraftModResources")
|
||||||
inputs.property("version", project.version)
|
dependsOn(processMinecraftModResources)
|
||||||
inputs.property("name", properties["module.name"])
|
from(processMinecraftModResources.get().destinationDir)
|
||||||
inputs.property("description", properties["module.description"])
|
|
||||||
inputs.property("repoUrl", properties["git.url"])
|
|
||||||
|
|
||||||
from(project.layout.settingsDirectory.dir("../tweed5-minecraft/mod-template/resources")) {
|
|
||||||
expand(mapOf(
|
|
||||||
"id" to project.name.replace('-', '_'),
|
|
||||||
"version" to project.version,
|
|
||||||
"name" to properties["module.name"].toString(),
|
|
||||||
"description" to properties["module.description"],
|
|
||||||
"repoUrl" to properties["git.url"],
|
|
||||||
))
|
|
||||||
}
|
|
||||||
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.named<Copy>("processTestmodResources") {
|
tasks.named<Copy>("processTestmodResources") {
|
||||||
inputs.property("id", project.name)
|
val processMinecraftTestmodResources = tasks.named<Sync>("processMinecraftTestmodResources")
|
||||||
inputs.property("version", project.version)
|
dependsOn(processMinecraftTestmodResources)
|
||||||
inputs.property("name", properties["module.name"])
|
from(processMinecraftTestmodResources.get().destinationDir)
|
||||||
inputs.property("description", properties["module.description"])
|
|
||||||
inputs.property("repoUrl", properties["git.url"])
|
|
||||||
|
|
||||||
from(project.layout.settingsDirectory.dir("../tweed5-minecraft/mod-template/resources")) {
|
|
||||||
expand(mapOf(
|
|
||||||
"id" to project.name.replace('-', '_') + "_testmod",
|
|
||||||
"version" to project.version,
|
|
||||||
"name" to properties["module.name"].toString() + " (test mod)",
|
|
||||||
"description" to properties["module.description"],
|
|
||||||
"repoUrl" to properties["git.url"],
|
|
||||||
))
|
|
||||||
}
|
|
||||||
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
"id": "tweed5",
|
"id": "tweed5",
|
||||||
"name": "Tweed 5",
|
"name": "Tweed 5",
|
||||||
"description": "Configuration focused libraries",
|
"description": "Configuration focused libraries",
|
||||||
"icon": "assets/tweed4_base/icon.png",
|
"icon": "assets/tweed5/logo-48.png",
|
||||||
"badges": [
|
"badges": [
|
||||||
"library"
|
"library"
|
||||||
]
|
]
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
},
|
},
|
||||||
"modmenu:api": true
|
"modmenu:api": true
|
||||||
},
|
},
|
||||||
"icon": "assets/tweed5/icon.png",
|
"icon": "assets/tweed5/logo-48.png",
|
||||||
"id": "${id}",
|
"id": "${id}",
|
||||||
"name": "${name}",
|
"name": "${name}",
|
||||||
"description": "${description}",
|
"description": "${description}",
|
||||||
|
|||||||
Reference in New Issue
Block a user