From 6ce5bb3063404c3f07db5e5838ab704d523017c6 Mon Sep 17 00:00:00 2001 From: modmuss50 Date: Tue, 23 Jun 2015 23:41:03 +0100 Subject: [PATCH] Last time fixing the mcmod.info file --- build.gradle | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/build.gradle b/build.gradle index 63c1d48ab..26ce2f25d 100644 --- a/build.gradle +++ b/build.gradle @@ -106,6 +106,23 @@ dependencies { compile "com.github.azanor:baubles:1.0.1.10:deobf@jar" } + +processResources + { + // replace stuff in mcmod.info, nothing else + from(sourceSets.main.resources.srcDirs) { + include 'mcmod.info' + + // replace version and mcversion + // ${version} are the exact strings being replaced + expand '@MODVERSION@':project.version + } + + // copy everything else, that's not the mcmod.info + from(sourceSets.main.resources.srcDirs) { + exclude 'mcmod.info' + } + } task sourceJar(type: Jar) { from sourceSets.main.allSource appendix = 'src'