Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@ out/
*.lnk
*.py
*.bat
*gradle
*gradlew
logs/
logs/
/bin/
.classpath
.project
.settings/
asm/
config/
options.txt
saves/
usernamecache.json

130 changes: 130 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -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 }
13 changes: 13 additions & 0 deletions build.properties
Original file line number Diff line number Diff line change
@@ -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
Empty file removed logs/latest.log
Empty file.
2 changes: 1 addition & 1 deletion src/main/java/vswe/production/page/unit/Unit.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/mcmod.info
Original file line number Diff line number Diff line change
@@ -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}",
Expand Down