diff --git a/build.gradle b/build.gradle index d420e65..19d0aae 100644 --- a/build.gradle +++ b/build.gradle @@ -1,42 +1,55 @@ buildscript { repositories { jcenter() - maven { url = "http://files.minecraftforge.net/maven" } + maven { url = "https://files.minecraftforge.net/maven" } } dependencies { - classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT' + classpath "net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT" } } -apply plugin: 'net.minecraftforge.gradle.forge' +plugins { + id "org.ajoberstar.reckon" version "0.9.0" +} +apply plugin: "net.minecraftforge.gradle.forge" sourceCompatibility = targetCompatibility = 1.8 -group = project.package_base -archivesBaseName = project.name + "-" + (project.mc_version as String) -version = project.mod_version +group = "org.teamrtg" +archivesBaseName = "${project.name}-${project.mc_version}" + +reckon { + scopeFromProp() + stageFromProp("alpha", "beta", "final") +} + +repositories { + maven { + name = "BoP" + url = "https://files.minecraftforge.net/maven" + } +} + +dependencies { + provided "com.github.glitchfiend.biomesoplenty:BiomesOPlenty:${project.mc_version}-${project.bop_version}:deobf" +} minecraft { - version = project.mcf_version + version = "${project.mc_version}-${project.mcf_version}" mappings = project.mcp_mappings makeObfSourceJar = false setRunDir "run" - replace '@MOD_VERSION@', project.version - replace '0.0-MCF+MINVER', project.mcf_minver - replace '9001.0-MCF+MAXVER', project.mcf_maxver - replace ';after:MODDEPS', (!project.hasProperty("mod_depstring")) ? "" : project.mod_depstring - replaceIn 'LonelyBiome.java' + replace "@MOD_VERSION@", project.version as String + replace "@MCF_MINVER@", project.mcf_minver + replace "@BOP_VERSION@", project.bop_version + replaceIn "LonelyBiome.java" } processResources { from(sourceSets.main.resources.srcDirs) { - include 'mcmod.info' - expand ([ - 'modid':project.mod_id, - 'name':project.mod_name, - 'version':project.mod_version, - 'mcversion':project.mc_version, - ]) + include "mcmod.info" + expand (["version":project.version as String, "mcversion":project.mc_version]) } - from(sourceSets.main.resources.srcDirs) {exclude 'mcmod.info'} + from(sourceSets.main.resources.srcDirs) {exclude "mcmod.info"} } +jar.manifest.attributes "Maven-Artifact": "${project.group}:${archivesBaseName}:${project.version}" diff --git a/gradle.properties b/gradle.properties index 9c3c0a1..c909168 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,13 +1,6 @@ -mod_id=lonelybiome -mod_name=LonelyBiome -mod_version=2.0.0 -mod_depstring= - mc_version=1.12.2 -mcf_version=14.23.0.2494 -mcf_minver=14.23.0.2491 -mcf_maxver= -mcp_mappings=snapshot_20170930 +mcf_version=14.23.5.2815 +mcf_minver=14.23.5.2779 +mcp_mappings=stable_39 -run_dir=run -package_base=org.teamrtg +bop_version=7.0.1.2399 diff --git a/src/main/java/teamrtg/lonelybiome/LonelyBiome.java b/src/main/java/teamrtg/lonelybiome/LonelyBiome.java index c67ff8f..91839df 100644 --- a/src/main/java/teamrtg/lonelybiome/LonelyBiome.java +++ b/src/main/java/teamrtg/lonelybiome/LonelyBiome.java @@ -35,24 +35,18 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -@SuppressWarnings("unused") + @Mod( - modid = LonelyBiome.MOD_ID, - name = LonelyBiome.MOD_NAME, - version = LonelyBiome.MOD_VERSION, - guiFactory = "teamrtg.lonelybiome.LonelyBiome$LBGuiConfigFactory", - dependencies = "required-after:forge@[" + LonelyBiome.MCF_MINVER + "," + LonelyBiome.MCF_MAXVER + ")" + LonelyBiome.MOD_DEPS, + modid = LonelyBiome.MOD_ID, + name = "Lonely Biome", + version = "@MOD_VERSION@", + dependencies = "required-after:forge@[@MCF_MINVER@,);after:biomesoplenty@[@BOP_VERSION@,);", + guiFactory = "teamrtg.lonelybiome.LBConfig$LBGuiConfigFactory", acceptableRemoteVersions = "*" ) public final class LonelyBiome { - static final String MOD_ID = "lonelybiome"; - static final String MOD_NAME = "Lonely Biome"; - static final String MOD_VERSION = "@MOD_VERSION@"; - static final String MCF_MINVER = "0.0-MCF+MINVER"; - static final String MCF_MAXVER = "9001.0-MCF+MAXVER"; - static final String MOD_DEPS = ";after:MODDEPS"; - private static final Logger LOGGER = LogManager.getLogger(MOD_ID); + static final String MOD_ID = "lonelybiome"; @Mod.Instance(MOD_ID) private static LonelyBiome instance; @Mod.EventHandler void initPre (FMLPreInitializationEvent event) { proxy.preInit (event); } diff --git a/src/main/resources/mcmod.info b/src/main/resources/mcmod.info index 6e5d474..bb24b7d 100644 --- a/src/main/resources/mcmod.info +++ b/src/main/resources/mcmod.info @@ -1,6 +1,6 @@ [{ - "modid": "${modid}", - "name": "${name}", + "modid": "lonelybiome", + "name": "Lonely Biome", "description": "A Minecraft mod that allows you generate single-biome worlds.", "version": "${version}", "mcversion": "${mcversion}",