Have gradle handle the version number in the code

This commit is contained in:
Emmanuel BENOîT 2016-07-12 15:08:45 +02:00
parent 75abf8b9d3
commit 8615a169a2
2 changed files with 4 additions and 1 deletions

View file

@ -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"
}

View file

@ -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 )