-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.gradle
More file actions
92 lines (83 loc) · 2.36 KB
/
build.gradle
File metadata and controls
92 lines (83 loc) · 2.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
buildscript {
repositories {
jcenter()
maven {
name = "forge"
url = "http://files.minecraftforge.net/maven"
}
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:2.2-SNAPSHOT'
}
}
plugins {
id 'org.ensime.gradle' version '0.2.8'
}
apply plugin: 'scala'
apply plugin: 'net.minecraftforge.gradle.forge'
def parseprops(File cfg) {
cfg.withReader {
def prop = new Properties()
prop.load(it)
return (new ConfigSlurper().parse(prop))
}
}
ext.ref = parseprops(file('build.properties'))
ext.ref.mod_deps = parseprops(file('mod_deps.properties'))
group = ref.package_base + '.' + ref.mod_id
archivesBaseName = ref.mod_id
version = (System.getenv("TRAVIS") ? "1.9-DEV-" + System.getenv('TRAVIS_BUILD_NUMBER') : ref.mc_version + '-' + ref.mod_version)
def versionName = (System.getenv("TRAVIS") ? "1.9-" + ref.mod_version + "-DEV-" + System.getenv('TRAVIS_BUILD_NUMBER') : version)
minecraft {
version = ref.mcf_version
runDir = ref.run_dir
mappings = ref.mappings
replace '@MOD_NAME@', ref.mod_name
replace '@MOD_ID@', ref.mod_id
replace '@MOD_VERSION@', versionName
replace '@MCF_VERSION@', ref.mcf_version
if (ref.mod_deps!="") replace '@MOD_DEPS@', ";" + ref.mod_deps.depstring
else replace '@MOD_DEPS@', ''
replaceIn 'ModInfo.java'
}
repositories {
maven {
// Tesla
url 'http://maven.epoxide.xyz'
}
maven {
// MCMultipart
url "http://maven.amadornes.com"
}
}
dependencies {
compile "net.darkhax.tesla:Tesla:1.9.4-1.1.0.24"
deobfCompile "MCMultiPart:MCMultiPart-experimental:1.2.0_71:deobf"
}
processResources {
from(sourceSets.main.resources.srcDirs) {
include 'mcmod.info'
expand ([
'modid':ref.mod_id,
'name':ref.mod_name,
'description':ref.mod_desc,
'version':ref.mod_version,
'mcversion':ref.mc_version,
'url':ref.mod_url,
'authorList':ref.mod_author,
'credits':ref.mod_creds,
'logoFile':ref.mod_logo,
])
}
from(sourceSets.main.resources.srcDirs) {exclude 'mcmod.info'}
}
allprojects {
tasks.withType(JavaExec) {
if (System.getProperty('DEBUG', 'false') == 'true') {
jvmArgs '-agentlib:jdwp=transport=dt_socket,address=localhost:5005,server=y,suspend=y'
}
}
}
runClient {
jvmArgs "-Xmx4G", "-Xms4G"
}