Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- plugins {
- id "net.minecraftforge.gradle.forge" version "2.0.2"
- }
- //apply plugin: 'forge'
- //apply plugin: 'java'
- // Fixes bug in IDEA 14 that wasn't putting resources into build/classes
- sourceSets {
- main { output.resourcesDir = output.classesDir }
- }
- ext {
- configFile = file "project.properties"
- srcWebDir = "src/main/resources/assets/journeymap/web/"
- implSrc = "build/resources/java/journeymap/feature/impl/"
- }
- configFile.withReader {
- def prop = new Properties()
- prop.load(it)
- project.ext.config = new ConfigSlurper().parse prop
- }
- version = "${config.minecraft_version}-${config.jm_major}.${config.jm_minor}.${config.jm_micro}${config.jm_patch}"
- group = "${config.group_id}"
- archivesBaseName = "${config.mod_id}".toLowerCase()
- minecraft {
- version = "${config.minecraft_version}-${config.forge_version}"
- runDir = "run"
- replace "@JMVERSION@", "${config.jm_major}.${config.jm_minor}.${config.jm_micro}${config.jm_patch}"
- replace "@MCVERSION@", config.minecraft_version
- replace "@FORGEVERSION@", config.forge_version
- replace "@MAJOR@", config.jm_major
- replace "@MINOR@", config.jm_minor
- replace "@MICRO@", config.jm_micro
- replace "@PATCH@", config.jm_patch
- mappings = "${config.snapshot}"
- }
- dependencies {
- compile fileTree(dir: 'libs', include: '*.*');
- }
- processResources {
- // this will ensure that this task is redone when the versions change.
- inputs.property "version", project.version
- inputs.property "mcversion", project.minecraft.version
- from(sourceSets.main.resources.srcDirs) {
- include 'license.txt'
- expand 'version': project.version, 'mcversion': project.minecraft.version, 'date' : getDate()
- }
- // copy everything else, thats not the mcmod.info
- from(sourceSets.main.resources.srcDirs) {
- exclude 'mcmod.info'
- exclude 'license.txt'
- }
- }
- def getDate() {
- def date = new Date()
- def formattedDate = date.format(config.dateFormat)
- return formattedDate
- }
Advertisement
Add Comment
Please, Sign In to add comment