From 8615a169a21b617faada643a5469b35ca54a6cb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emmanuel=20Beno=C3=AEt?= Date: Tue, 12 Jul 2016 15:08:45 +0200 Subject: [PATCH] Have gradle handle the version number in the code --- build.gradle | 3 +++ src/java/mmm/Mmm.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index f06c2c6..dece75d 100644 --- a/build.gradle +++ b/build.gradle @@ -38,6 +38,9 @@ minecraft { runDir = "run" mappings = "${mappings_version}" // makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable. + + replace "@VERSION@", project.version + replaceIn "Mmm.java" } diff --git a/src/java/mmm/Mmm.java b/src/java/mmm/Mmm.java index b9431a8..e19d758 100644 --- a/src/java/mmm/Mmm.java +++ b/src/java/mmm/Mmm.java @@ -15,7 +15,7 @@ public class Mmm public static final String ID = "mmm"; public static final String NAME = "MMM!"; - public static final String VERSION = "1.9-1.10.2"; + public static final String VERSION = "@VERSION@"; public static final String PREFIX = Mmm.ID + "."; @Mod.Instance( Mmm.ID )