Pass description into mod files via Gradle as well

This commit is contained in:
FlorianMichael 2024-08-05 20:04:22 +02:00
parent 5316e8da17
commit e8327312cb
No known key found for this signature in database
GPG Key ID: C2FB87E71C425126
9 changed files with 25 additions and 32 deletions

View File

@ -46,20 +46,8 @@ allprojects {
}
}
// Replace the version in the mcmod.info and mods.toml files with the project version
// Since this depends on the platform version, we can't define it in the global scope :(
tasks {
processResources {
for (final def file in ["mcmod.info", "META-INF/mods.toml"]) {
filesMatching(file) {
expand "version": project.version
}
}
}
}
// Including all required libraries for ViaVersion {for version numbers see gradle.properties}
dependencies {
// For common source code
compileOnly "io.netty:netty-all:4.1.112.Final"
library "com.viaversion:viaversion-common:5.0.3-SNAPSHOT"
@ -85,6 +73,7 @@ subprojects {
group = project.maven_group
archivesName = project.name
version = project.maven_version
description = project.maven_description
}
def mcVersion = project.forge_version.split("-")[0]
@ -140,6 +129,21 @@ subprojects {
library project(":") // Include the base project, to get Common-ViaForge
}
// Replace the version in the mcmod.info and mods.toml files with the project version
// Since this depends on the platform version, we can't define it in the global scope :(
tasks {
processResources {
for (final def file in ["mcmod.info", "META-INF/mods.toml"]) {
filesMatching(file) {
expand (
"version": project.version,
"description": project.description
)
}
}
}
}
mixin {
add sourceSets.main, "mixins.${project.name}.refmap.json"
}

View File

@ -5,6 +5,7 @@ org.gradle.daemon=false
# Project Details
maven_group=de.florianmichael
maven_version=3.7.1-SNAPSHOT
maven_description=Client-side Implementation of the Via* projects for Minecraft Forge
slf4j_version=2.0.7
mixin_version=0.8.3

View File

@ -2,7 +2,7 @@
{
"modid": "viaforge",
"name": "ViaForge",
"description": "Client-side Implementation of the Via* projects for Minecraft Forge",
"description": "${description}",
"version": "${version}",
"mcversion": "[1.12,)",
"url": "https://github.com/ViaVersion/ViaForge",

View File

@ -13,6 +13,4 @@ displayURL="https://github.com/FlorianMichael"
logoFile="icon.png"
credits="Github contributors"
authors="FlorianMichael/EnZaXD"
description='''
Client-side Implementation of the Via* projects for Minecraft Forge
'''
description="${description}"

View File

@ -13,6 +13,4 @@ displayURL="https://github.com/FlorianMichael"
logoFile="icon.png"
credits="Github contributors"
authors="FlorianMichael/EnZaXD"
description='''
Client-side Implementation of the Via* projects for Minecraft Forge
'''
description="${description}"

View File

@ -13,6 +13,4 @@ displayURL="https://github.com/FlorianMichael"
logoFile="icon.png"
credits="Github contributors"
authors="FlorianMichael/EnZaXD"
description='''
Client-side Implementation of the Via* projects for Minecraft Forge
'''
description="${description}"

View File

@ -13,6 +13,4 @@ displayURL="https://github.com/FlorianMichael"
logoFile="icon.png"
credits="Github contributors"
authors="FlorianMichael/EnZaXD"
description='''
Client-side Implementation of the Via* projects for Minecraft Forge
'''
description="${description}"

View File

@ -13,6 +13,4 @@ displayURL="https://github.com/FlorianMichael"
logoFile="icon.png"
credits="Github contributors"
authors="FlorianMichael/EnZaXD"
description='''
Client-side Implementation of the Via* projects for Minecraft Forge
'''
description="${description}"

View File

@ -13,6 +13,4 @@ displayURL="https://github.com/FlorianMichael"
logoFile="icon.png"
credits="Github contributors"
authors="FlorianMichael/EnZaXD"
description='''
Client-side Implementation of the Via* projects for Minecraft Forge
'''
description="${description}"