diff --git a/buildSrc/src/main/groovy/florianmichael.viaforge.base-conventions.gradle b/buildSrc/src/main/groovy/florianmichael.viaforge.base-conventions.gradle index 9fb1c59..a57dd44 100644 --- a/buildSrc/src/main/groovy/florianmichael.viaforge.base-conventions.gradle +++ b/buildSrc/src/main/groovy/florianmichael.viaforge.base-conventions.gradle @@ -4,7 +4,7 @@ plugins { } archivesBaseName = project.maven_name -version = maven_version + project.mc_version +version = maven_version + "-" + project.mc_version group = maven_group compileJava.options.encoding = "UTF-8" @@ -31,3 +31,14 @@ dependencies { include "net.raphimc:ViaLoader:${project.vialoader_version}" } + +processResources { + inputs.property "version", project.version + + + for (final def file in ["mcmod.info", "META-INF/mods.toml"]) { + filesMatching(file) { + expand "version": project.version + } + } +} diff --git a/buildSrc/src/main/groovy/florianmichael.viaforge.forge-conventions.gradle b/buildSrc/src/main/groovy/florianmichael.viaforge.forge-conventions.gradle index 991eaa1..8abe1b2 100644 --- a/buildSrc/src/main/groovy/florianmichael.viaforge.forge-conventions.gradle +++ b/buildSrc/src/main/groovy/florianmichael.viaforge.forge-conventions.gradle @@ -8,15 +8,16 @@ minecraft { client { workingDirectory project.file("run") - property 'forge.logging.markers', 'REGISTRIES' + property "forge.logging.markers", "REGISTRIES" property "forge.logging.console.level", "debug" // mixin - property 'mixin.debug.export', 'true' + property "mixin.debug.export", "true" property "mixin.hotSwap", "true" property "fml.coreMods.load", "de.florianmichael.viaforge.mixin.MixinLoader" - args '-mixin.config=' + 'mixins.' + project.getProperty('maven_name') + '.json' + args '-mixin.config=' + 'mixins.' + project.getProperty('maven_name') + ".json" + // source set mods { "ViaForge" { source sourceSets.main diff --git a/viaforge-mc112/src/main/resources/mcmod.info b/viaforge-mc112/src/main/resources/mcmod.info index ea3d531..4c11457 100644 --- a/viaforge-mc112/src/main/resources/mcmod.info +++ b/viaforge-mc112/src/main/resources/mcmod.info @@ -3,8 +3,8 @@ "modid": "viaforge", "name": "ViaForge", "description": "Client-side Implementation of ViaVersion, ViaBackwards and ViaRewind for Legacy Minecraft Forge", - "version": "3.3.3", - "mcversion": "[1.8,1.12.2]", + "version": "${version}", + "mcversion": "[1.12.2]", "url": "https://github.com/ViaVersion/ViaForge", "updateUrl": "", "authorList": [ diff --git a/viaforge-mc116/src/main/resources/META-INF/mods.toml b/viaforge-mc116/src/main/resources/META-INF/mods.toml index da8666d..b5beba3 100644 --- a/viaforge-mc116/src/main/resources/META-INF/mods.toml +++ b/viaforge-mc116/src/main/resources/META-INF/mods.toml @@ -7,7 +7,7 @@ showAsResourcePack=false [[mods]] modId="viaforge" -version="3.3.3" +version="${version}" displayName="ViaForge" displayURL="https://github.com/FlorianMichael" credits="FlorianMichael/EnZaXD and all ViaVersion/ViaForge contributors"