forked from Arcaratus/BloodArsenal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
104 lines (89 loc) · 2.89 KB
/
build.gradle
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
93
94
95
96
97
98
99
100
101
102
103
104
buildscript {
repositories {
mavenCentral()
maven {
name = "forge"
url = "http://files.minecraftforge.net/maven"
}
maven {
name = "sonatype"
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 + "-" + 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 { //Tinker's and Mantle
name 'DVS1 Maven FS'
url 'http://dvs1.progwml6.com/files/maven'
}
maven { // the repo from which to get NEI and stuff
name 'CB Repo'
url "http://chickenbones.net/maven/"
}
maven { //WAILA
name "ProfMobius Maven FS"
url "http://mobiusstrip.eu/maven"
}
maven {
name "ForgeFS"
url 'http://files.minecraftforge.net/maven'
}
}
minecraft {
version = config.forge_version + "-" + config.mc_version
runDir = "eclipse"
replaceIn "BloodArsenal.java"
replace "@VERSION@", config.mod_version + "-" + config.build_number
}
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"
compile "codechicken:ForgeMultipart:" + config.mc_version + "-" + config.forgeMultipart_version + ":dev"
compile "mcp.mobius.waila:Waila:" + config.waila_version + "_" + config.mc_version + ":dev"
compile "mantle:Mantle:1.7.10-0.3.2.jenkins187:deobf"
compile "tconstruct:TConstruct:" + config.mc_version + "-" + config.tconstruct_version + ":deobf"
}
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'
}
}
task deobfJar(type: Jar) {
from(sourceSets.main.output)
classifier = 'deobf'
tasks.build.dependsOn deobfJar
tasks.withType(JavaCompile) { task ->
task.options.encoding = 'UTF-8'
}
}