Automatically replace mod version in ModUtil class

This commit is contained in:
AtomSponge 2015-11-29 12:07:15 +01:00
parent b8ef82bc2d
commit 12cc5c1718
2 changed files with 7 additions and 7 deletions

View file

@ -25,6 +25,9 @@ archivesBaseName = "ActuallyAdditions"
minecraft { minecraft {
version = "1.7.10-10.13.4.1558-1.7.10" version = "1.7.10-10.13.4.1558-1.7.10"
runDir = "idea" runDir = "idea"
replaceIn "ModUtil.java"
replace "mod_version", project.version.toString()
} }
repositories { repositories {
@ -46,7 +49,6 @@ dependencies {
} }
processResources { processResources {
inputs.property "version", project.version inputs.property "version", project.version
inputs.property "mcversion", project.minecraft.version inputs.property "mcversion", project.minecraft.version

View file

@ -16,13 +16,11 @@ import org.apache.logging.log4j.Logger;
import java.util.Locale; import java.util.Locale;
public class ModUtil { public class ModUtil {
public static final String VERSION = "mod_version"; // Will be replaced by gradle
public static final String VERSION = "1.7.10-r8";
public static final String MOD_ID = "ActuallyAdditions"; public static final String MOD_ID = "ActuallyAdditions";
public static final String NAME = "Actually Additions"; public static final String NAME = "Actually Additions";
public static final String MOD_ID_LOWER = MOD_ID.toLowerCase(Locale.ROOT); public static final String MOD_ID_LOWER = MOD_ID.toLowerCase(Locale.ROOT);
public static final Logger LOGGER = LogManager.getLogger(MOD_ID); public static final Logger LOGGER = LogManager.getLogger(MOD_ID);
} }