Merge pull request #727 from srs-bsns/BOP-1.9-4.0.x

Sets a full version number with appended build number for mod registr…
This commit is contained in:
Adubbz 2016-03-29 11:11:45 +11:00
commit 334b746713
2 changed files with 17 additions and 7 deletions

View file

@ -29,17 +29,26 @@ configFile.withReader {
} }
group = "com.github.glitchfiend.biomesoplenty" group = "com.github.glitchfiend.biomesoplenty"
// why set the version twice?
version = config.mod_version version = config.mod_version
archivesBaseName = "BiomesOPlenty" archivesBaseName = "BiomesOPlenty"
minecraft {
version = config.minecraft_version + "-" + config.forge_version // grab latest forge
useDepAts = true
mappings = project.config.mappings_version
}
// add some stuff to the version // add some stuff to the version
version = "${config.minecraft_version}-${config.mod_version}.${System.getenv().BUILD_NUMBER}" version = "${config.minecraft_version}-${config.mod_version}.${System.getenv().BUILD_NUMBER}"
// set this for the version.properties file, or was this broken on purpose?
config.build_number = (System.getenv().BUILD_NUMBER) ? System.getenv().BUILD_NUMBER : ""
minecraft {
version = config.minecraft_version + "-" + config.forge_version // grab latest forge
useDepAts = true
mappings = project.config.mappings_version
//gradle complains if this isn't set when setting up/using IDEA workspace
runDir = "run"
//set a full version string with appended build number to be used in mod registration
def buildnum = (config.build_number!="") ? '.' + config.build_number : ""
replace '@MOD_VERSION@', config.mod_version + buildnum
replaceIn 'BiomesOPlenty.java'
}
def commonManifest = { def commonManifest = {
attributes 'FMLAT': 'biomesoplenty_at.cfg' attributes 'FMLAT': 'biomesoplenty_at.cfg'

View file

@ -40,11 +40,12 @@ import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
import net.minecraftforge.fml.common.event.FMLServerStartingEvent; import net.minecraftforge.fml.common.event.FMLServerStartingEvent;
import net.minecraftforge.fml.common.network.NetworkRegistry; import net.minecraftforge.fml.common.network.NetworkRegistry;
@Mod(modid = BiomesOPlenty.MOD_ID, name = BiomesOPlenty.MOD_NAME, dependencies = "required-after:Forge@[11.14.3.1468,)", guiFactory = BiomesOPlenty.GUI_FACTORY) @Mod(modid = BiomesOPlenty.MOD_ID, version = BiomesOPlenty.MOD_VERSION , name = BiomesOPlenty.MOD_NAME, dependencies = "required-after:Forge@[11.14.3.1468,)", guiFactory = BiomesOPlenty.GUI_FACTORY)
public class BiomesOPlenty public class BiomesOPlenty
{ {
public static final String MOD_NAME = "Biomes O' Plenty"; public static final String MOD_NAME = "Biomes O' Plenty";
public static final String MOD_ID = "BiomesOPlenty"; public static final String MOD_ID = "BiomesOPlenty";
public static final String MOD_VERSION = "@MOD_VERSION@";
public static final String GUI_FACTORY = "biomesoplenty.client.gui.GuiFactory"; public static final String GUI_FACTORY = "biomesoplenty.client.gui.GuiFactory";
@Instance(MOD_ID) @Instance(MOD_ID)