Have gradle handle the version number in the code
This commit is contained in:
parent
75abf8b9d3
commit
8615a169a2
2 changed files with 4 additions and 1 deletions
|
@ -38,6 +38,9 @@ minecraft {
|
||||||
runDir = "run"
|
runDir = "run"
|
||||||
mappings = "${mappings_version}"
|
mappings = "${mappings_version}"
|
||||||
// makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.
|
// makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.
|
||||||
|
|
||||||
|
replace "@VERSION@", project.version
|
||||||
|
replaceIn "Mmm.java"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@ public class Mmm
|
||||||
|
|
||||||
public static final String ID = "mmm";
|
public static final String ID = "mmm";
|
||||||
public static final String NAME = "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 + ".";
|
public static final String PREFIX = Mmm.ID + ".";
|
||||||
|
|
||||||
@Mod.Instance( Mmm.ID )
|
@Mod.Instance( Mmm.ID )
|
||||||
|
|
Reference in a new issue