From ae176e6c1f9a6ae4115a1441ec500d72037d3817 Mon Sep 17 00:00:00 2001 From: cpw Date: Sun, 27 Jan 2019 11:37:56 -0500 Subject: Use recommended approach to applying version data to mdk. Signed-off-by: cpw --- build.gradle | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) (limited to 'build.gradle') diff --git a/build.gradle b/build.gradle index 5dd003e..ee99238 100644 --- a/build.gradle +++ b/build.gradle @@ -78,21 +78,15 @@ dependencies { } -processResources { - // this will ensure that this task is redone when the versions change. - inputs.property 'version', project.version - inputs.property 'mcversion', '@MC_VERSION@' - - // replace stuff in mcmod.info, nothing else - from(sourceSets.main.resources.srcDirs) { - include 'META_INF/mods.toml' - - // replace version and mcversion - expand 'version':project.version, 'mcversion': '@MC_VERSION@' - } - - // copy everything else except the mods.toml - from(sourceSets.main.resources.srcDirs) { - exclude 'META_INF/mods.toml' +// Example for how to get properties into the manifest for reading by the runtime.. +jar { + manifest { + attributes(["Specification-Title": "examplemod", + "Specification-Vendor": "examplemodsareus", + "Specification-Version": "24.0", // We are version 1 of the modlauncher specification + "Implementation-Title": project.name, + "Implementation-Version": "${version}", + "Implementation-Vendor" :"examplemodsareus", + "Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")],) } -} +} \ No newline at end of file -- cgit v1.2.3