From d86eb4d9f0e16e5acc0f35a88b894eca4592abf5 Mon Sep 17 00:00:00 2001 From: syeyoung Date: Fri, 24 Feb 2023 23:21:04 +0900 Subject: - version info injection Signed-off-by: syeyoung --- mod/build.gradle | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'mod') diff --git a/mod/build.gradle b/mod/build.gradle index ca9d2054..4cabcd60 100644 --- a/mod/build.gradle +++ b/mod/build.gradle @@ -114,6 +114,16 @@ loom { } } +ext.genOutputDir = file("$buildDir/generated-resources") + +task generateVersionInfo { + ext.outputFile = file("$genOutputDir/versionMeta.properties") + outputs.file(outputFile) + doLast { + outputFile.text = "VERSION=${project.version}\nMANDATORY_VERSION=0" + } +} +sourceSets.main.output.dir genOutputDir, builtBy: generateVersionInfo tasks.withType(JavaCompile) { options.encoding = "UTF-8" @@ -126,6 +136,8 @@ tasks.withType(Jar) { // this["TweakClass"] = "org.spongepowered.asm.launch.MixinTweaker" // this["MixinConfigs"] = "mixins.examplemod.json" } + + } -- cgit