Implemented Automatic Versioning in Build Script

1. Changed build.gradle so that it edits the version numbers in
mod_pocketDim.java and mcmod.info.
2. Changed mod_pocketDim to use a placeholder for its version number and
fixed an annotation that was wrong. It would cause our mod_pocketDim
instance to not initialize properly. I removed what seemed to be
workarounds that were hiding the problem.
3. Fixed space in TileEntityDimDoor.invalidate() and corrected a
non-static access to a static field in mod_pocketDim.
4. Changed mcmod.info so that it users placeholders for the mod version
and MC version values.
This commit is contained in:
SenseiKiwi
2014-07-09 04:01:37 -04:00
parent 7d840ff895
commit 2904ec146d
4 changed files with 25 additions and 25 deletions

View File

@@ -13,10 +13,8 @@ buildscript {
apply plugin: 'forge'
version = "2.2.4-" + System.getenv("BUILD_NUMBER")
group= "com.stevenrs11.dimdoors" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
group = "com.stevenrs11.dimdoors" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "DimensionalDoors"
minecraft {
@@ -28,17 +26,19 @@ sourceCompatibility = '1.6'
processResources
{
// replace stuff in mcmod.info, nothing else
// Replace stuff $version and $mcversion in mcmod.info and mod_pocketDim.java
from(sourceSets.main.resources.srcDirs) {
include 'mcmod.info'
include 'mod_pocketDim.java'
// replace version and mcversion
// Replace version and mcversion
expand 'version':project.version, 'mcversion':project.minecraft.version
}
// copy everything else, thats not the mcmod.info
// Copy everything else
from(sourceSets.main.resources.srcDirs) {
exclude 'mcmod.info'
exclude 'mod_pocketDim.java'
}
}