diff --git a/.gitignore b/.gitignore index d27a4a6..935dce0 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,15 @@ out/ *.lnk *.py *.bat -*gradle *gradlew -logs/ \ No newline at end of file +logs/ +/bin/ +.classpath +.project +.settings/ +asm/ +config/ +options.txt +saves/ +usernamecache.json + diff --git a/build.gradle b/build.gradle new file mode 100644 index 0000000..cded7a2 --- /dev/null +++ b/build.gradle @@ -0,0 +1,130 @@ +buildscript { + repositories { + mavenCentral() + maven { url = "http://files.minecraftforge.net/maven" } + maven { url = "https://oss.sonatype.org/content/repositories/snapshots/" } + } + dependencies { + classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT' + classpath 'org.ajoberstar:gradle-git:0.10.1' + } +} + +apply plugin: 'forge' + +ext.configFile = file "build.properties" +configFile.withReader { + def prop = new Properties() + prop.load(it) + project.ext.config = new ConfigSlurper().parse prop +} + +version = config.mc_version + "-" + config.mod_version + "-Vindex-release-" + config.vindex_version + "-" + config.build_number +group= config.package_group +archivesBaseName = config.mod_name + +import org.ajoberstar.grgit.Grgit + +def gitHash = 'unknown' +if (new File(projectDir, '.git').exists()) { + def repo = Grgit.open(project.file('.')) + gitHash = repo.log().find().abbreviatedId +} + +repositories { + maven { + name 'CB Maven FS' + url "http://chickenbones.net/maven/" + } + maven { + name 'DVS1 Maven FS' + url 'http://dvs1.progwml6.com/files/maven' + } + maven { + url 'http://tehnut.info/maven/' + } + ivy { + name "MineTweaker3" + artifactPattern "http://minetweaker3.powerofbytes.com/download/[module]-[revision].[ext]" + } +} + +dependencies { + compile "codechicken:CodeChickenLib:" + config.mc_version + "-" + config.cclib_version + ":dev" + compile "codechicken:CodeChickenCore:" + config.mc_version + "-" + config.ccc_version + ":dev" + compile "codechicken:NotEnoughItems:" + config.mc_version + "-" + config.nei_version + ":dev" +} + +minecraft { + version = config.mc_version + "-" + config.forge_version + runDir = "run" +} + +processResources { + inputs.property "version", project.version + inputs.property "mcversion", project.minecraft.version + + from(sourceSets.main.resources.srcDirs) { + include '**/*.info' + include '**/*.properties' + + expand 'version': project.version, 'mcversion': project.minecraft.version + } + from(sourceSets.main.resources.srcDirs) { + exclude '**/*.info' + exclude '**/*.properties' + exclude '**/*.db' + } +} + +jar { + dependsOn "incrementBuildNumber" + classifier = '' + manifest.mainAttributes( + "Built-By": System.getProperty('user.name'), + "Created-By": "${System.getProperty('java.vm.version')} + (${System.getProperty('java.vm.vendor')})", + "Implementation-Title": project.name, + "Implementation-Version": project.version, + "Git-Hash": gitHash + ) +} + +// add a source jar +task sourceJar(type: Jar) { + from sourceSets.main.allSource + classifier = 'sources' +} + +// add a javadoc jar +task javadocJar(type: Jar, dependsOn: javadoc) { + from javadoc.destinationDir + classifier = 'javadoc' +} + +// because the normal output has been made to be obfuscated +task deobfJar(type: Jar) { + from sourceSets.main.output + classifier = 'deobf' +} + +tasks.build.dependsOn sourceJar, javadocJar, deobfJar + +tasks.withType(JavaCompile) { task -> + task.options.encoding = 'UTF-8' +} + +task("incrementBuildNumber") { + // increment build number + doFirst { + // increment + config.build_number = (config.build_number.toString().toInteger()) + 1 + + // write back to the file + configFile.withWriter { + config.toProperties().store(it, "") + } + } +} + +// Uncomment this line if you want to auto-upload to CurseForge when you build. This requires you to setup curse.gradle yourself. +// fileTree('gradle').include('curse.gradle').collect().sort().each { apply from: it } \ No newline at end of file diff --git a/build.properties b/build.properties new file mode 100644 index 0000000..5345a89 --- /dev/null +++ b/build.properties @@ -0,0 +1,13 @@ +# +#Sat Aug 29 18:29:49 CEST 2015 +mod_name=StevesWorkshop +forge_version=10.13.3.1374-1.7.10 +ccc_version=1.0.4.29 +cclib_version=1.1.1.106 +vindex_version=1 +nei_version=1.0.3.74 +//=Dependency Information +package_group=vswe.production +mod_version=0.5.1 +mc_version=1.7.10 +build_number=6 diff --git a/logs/latest.log b/logs/latest.log deleted file mode 100644 index e69de29..0000000 diff --git a/src/main/java/vswe/production/page/unit/Unit.java b/src/main/java/vswe/production/page/unit/Unit.java index a9679bb..4dc3aa8 100644 --- a/src/main/java/vswe/production/page/unit/Unit.java +++ b/src/main/java/vswe/production/page/unit/Unit.java @@ -107,7 +107,7 @@ public int getId() { public abstract int createSlots(int id); - public static final int PRODUCTION_TIME = 400; + public static final int PRODUCTION_TIME = 800; private int productionProgress; private int chargeCount; public static final int CHARGES_PER_LEVEL = 4; diff --git a/src/main/resources/mcmod.info b/src/main/resources/mcmod.info index 802ca52..0a47516 100644 --- a/src/main/resources/mcmod.info +++ b/src/main/resources/mcmod.info @@ -1,7 +1,7 @@ [ { "modid": "StevesWorkshop", - "name": "Steve's Workshop", + "name": "Steve's Workshop (modified by Vindex for bugfixes)", "description": "Adds a modular production table for crafting and smelting", "version": "${version}", "mcversion": "${mcversion}",