122 lines
3.4 KiB
Groovy
Executable File
122 lines
3.4 KiB
Groovy
Executable File
buildscript {
|
|
repositories {
|
|
mavenLocal()
|
|
maven { url = 'https://files.minecraftforge.net/maven' }
|
|
jcenter()
|
|
mavenCentral()
|
|
}
|
|
dependencies {
|
|
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '3.+', changing: true
|
|
}
|
|
}
|
|
|
|
apply plugin: 'net.minecraftforge.gradle'
|
|
apply plugin: 'maven'
|
|
apply plugin: 'eclipse'
|
|
apply plugin: 'maven-publish'
|
|
|
|
repositories {
|
|
maven {
|
|
name 'DVS1 Maven FS'
|
|
url 'http://dvs1.progwml6.com/files/maven'
|
|
}
|
|
}
|
|
|
|
group = "com.progwml6.ironchest"
|
|
|
|
sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8'
|
|
|
|
minecraft {
|
|
mappings channel: 'snapshot', version: mappings_version
|
|
|
|
runs {
|
|
client = {
|
|
// recommended logging data for a userdev environment
|
|
properties 'forge.logging.markers': 'SCAN,REGISTRIES,REGISTRYDUMP'
|
|
// recommended logging level for the console
|
|
properties 'forge.logging.console.level': 'debug'
|
|
workingDirectory project.file('run').canonicalPath
|
|
source sourceSets.main
|
|
}
|
|
server = {
|
|
// recommended logging data for a userdev environment
|
|
properties 'forge.logging.markers': 'SCAN,REGISTRIES,REGISTRYDUMP'
|
|
// recommended logging level for the console
|
|
properties 'forge.logging.console.level': 'debug'
|
|
workingDirectory project.file('run').canonicalPath
|
|
source sourceSets.main
|
|
}
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
minecraft 'net.minecraftforge:forge:' + minecraft_version + '-' + forge_version
|
|
}
|
|
|
|
task buildInfo {
|
|
def cmd = "git rev-parse --short HEAD"
|
|
def proc = cmd.execute()
|
|
proc.waitFor()
|
|
if (proc.exitValue() == 0) {
|
|
ext.revision = proc.text.trim()
|
|
} else {
|
|
ext.revision = "GITBORK"
|
|
}
|
|
|
|
if (System.getenv().BUILD_NUMBER != null) {
|
|
ext.buildNum = System.getenv().BUILD_NUMBER
|
|
} else {
|
|
ext.buildNum = "DEV.${project.buildInfo.revision}"
|
|
}
|
|
}
|
|
|
|
version = "${minecraft_version}-${mod_version}.${project.buildInfo.buildNum}"
|
|
|
|
processResources {
|
|
exclude '**/*.xcf'
|
|
from(sourceSets.main.resources.srcDirs) {
|
|
include 'META-INF/mods.toml'
|
|
|
|
expand 'version': project.version, 'mcversion': minecraft_version
|
|
}
|
|
|
|
from(sourceSets.main.resources.srcDirs) {
|
|
exclude 'META-INF/mods.toml'
|
|
}
|
|
}
|
|
|
|
task sourcesJar(type: Jar) {
|
|
from sourceSets.main.allJava
|
|
classifier = 'sources'
|
|
}
|
|
|
|
artifacts {
|
|
archives sourcesJar
|
|
}
|
|
|
|
jar {
|
|
manifest {
|
|
attributes(["Specification-Title": "Iron Chests",
|
|
"Specification-Vendor": "Progwml6",
|
|
"Specification-Version": "1", // We are version 1 of ourselves
|
|
"Implementation-Title": project.name,
|
|
"Implementation-Version": "${version}",
|
|
"Implementation-Vendor" :"Progwml6",
|
|
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")],)
|
|
}
|
|
}
|
|
|
|
publishing {
|
|
publications {
|
|
mavenJava(MavenPublication) {
|
|
artifact jar
|
|
artifact sourcesJar
|
|
}
|
|
}
|
|
|
|
repositories {
|
|
if (project.hasProperty('DEPLOY_DIR')) {
|
|
maven { url DEPLOY_DIR }
|
|
}
|
|
}
|
|
} |