/
build.gradle
251 lines (227 loc) · 9.12 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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
buildscript {
repositories {
mavenCentral()
jcenter()
maven {
name = "gtnh"
url = "http://jenkins.usrv.eu:8081/nexus/content/groups/public/"
}
maven {
name = "gt"
url = "https://gregtech.overminddl1.com/"
}
maven {
name = "sonatype"
url = "https://oss.sonatype.org/content/repositories/snapshots/"
}
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:1.2.11'
}
}
allprojects {
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:deprecation" << "-Xlint:unchecked"
}
}
apply plugin: 'eclipse'
eclipse {
classpath {
downloadJavadoc = true
downloadSources = true
}
}
apply plugin: 'idea'
idea{
module {
downloadJavadoc = true
downloadSources = true
}
}
apply plugin: 'forge'
version = "<UNKNOWN>"
group = "supercoder79.greggen" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "GregGen"
minecraft {
version = "1.7.10-10.13.4.1614-1.7.10"
runDir = "eclipse"
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
//compileJava.options.bootClasspath = org.gradle.internal.jvm.Jvm.current().getJre().getHomeDir().toString() +"/lib/rt.jar"
repositories {
maven {
name = "gt"
url = "http://gregtech.overminddl1.com/"
}
}
dependencies {
// `compile` means it is both compiled with and run with `run*`
// `compileOnly` means it is only used to compile with but not run in dev via run*
compile "com.gregoriust.gregtech:gregtech_1.7.10:6-SNAPSHOT:dev"
compile "codechicken:CodeChickenLib:1.7.10-1.1.3.140:dev"
compile "codechicken:CodeChickenCore:1.7.10-1.0.7.47:dev"
compile "codechicken:NotEnoughItems:1.7.10-1.0.5.120:dev"
//compileOnly "appeng:appliedenergistics2:rv3-beta-6:dev"
//compileOnly "applecore:AppleCore:1.7.10-3.1.1:deobf"
//compileOnly "ic2:IC2Classic:1.2.1.8:dev"
compileOnly "micdoodle8.mods:GalacticraftCore:1.7-3.0.12.504:Dev"
compileOnly "micdoodle8.mods:MicdoodleCore:1.7-3.0.12.504:Dev"
//compile fileTree(dir: 'libs', include: '*.jar') // If you use this, don't commit them to VCS
//compileOnly "appeng:appliedenergistics2:rv3-beta-6:dev"
//compileOnly "applecore:AppleCore:1.7.10-3.1.1:deobf"
//compileOnly "binnie:binnie-mods:1.7.10-2.0.22:dev"
//compileOnly "blusunrize:ImmersiveEngineering:0.7.7:deobf"
//compileOnly "climateControl:ClimateControl:0.6.61" // Hack
//compileOnly "climateControl:ClimateControl:0.8.2" // Hack
//compileOnly "climateControl:climateControl:0.6.beta59:dev" // Does nothing but compiles successfully
//compileOnly "codechicken:CodeChickenCore:1.7.10-1.0.7.47:dev"
//compileOnly "codechicken:CodeChickenLib:1.7.10-1.1.3.140:dev"
//compileOnly "codechicken:ForgeMultipart:1.7.10-1.2.0.347:dev"
//compileOnly "codechicken:NotEnoughItems:1.7.10-1.0.5.120:dev"
//compileOnly "cofh:CoFHCore:1.7.10R3.0.4:dev"
//compileOnly "cofh:CoFHLib:1.7.10R3.0.3:dev"
//compileOnly "com.InfinityRaider.AgriCraft:AgriCraft:1.7.10-1.5.0:dev"
//compileOnly "com.amadornes.framez:Framez:1.7.10-0.2-33:deobf"
//compileOnly "com.amadornes.jtraits:JTraits:0.1"
//compileOnly "com.azanor.baubles:Baubles:1.7.10-1.0.1.10:deobf"
//compileOnly "com.bioxx.tfc:TerraFirmaCraft_1.7.10:0.79.28.908:deobf"
//compileOnly "com.bluepowermod:BluePower:1.7.10-0.2.963:deobf"
//compileOnly "com.builtbroken:ICBM:1.7.10-2.15.5b514:deobf-dev"
//compileOnly "com.builtbroken:VoltzEngine:1.7.10-1.11.0b466:deobf"
//compileOnly "com.carpentersblocks:CarpentersBlocks:3.3.8.2:dev"
//compileOnly "com.chocolate.chocolateQuest:chocolateQuest:1.7.10-1.1d" // Hack
//compileOnly "com.creativemd:craftingmanager:0.7.6:dev"
//compileOnly "com.creativemd:creativecore:1.3.24:dev"
//compileOnly "com.gregoriust.gregtech:gregtech_1.7.10:6.09.00:dev"
//compileOnly "com.mod-buildcraft:buildcraft:7.1.23:dev"
//compileOnly "com.rwtema.funkylocomotion:funky-locomotion-1.7.10:beta-7:deobf"
//compileOnly "com.wayoftime.bloodmagic:BloodMagic:1.7.10-1.3.3-18:deobf"
//compileOnly "com.xcompwiz:mystcraft:1.7.10-0.12.3.04:dev"
//compileOnly "dan200.computercraft:ComputerCraft:1.75" // Hack
//compileOnly "delvr.streams:Streams:1.7.10-0.3.4:deobf"
//compileOnly "enviromine:EnviroMine:1.3.124:deobf"
//compileOnly "extracells:ExtraCells:1.7.10-2.3.14b200:deobf"
//compileOnly "ic2:IC2Classic:1.2.1.8:dev"
//compileOnly "java.moze_intel:ProjectE:1.7.10-PE1.10.1:dev"
//compileOnly "li.cil.oc:OpenComputers:MC1.7.10-1.7.2.1204:dev"
//compileOnly "mcp.mobius.waila:Waila:1.5.10_1.7.10:dev"
//compileOnly "mekanism:MekanismAll:1.7.10-9.1.1.283:dev"
//compileOnly "micdoodle8.mods:Galacticraft-Planets:1.7-3.0.12.504:Dev"
//compileOnly "micdoodle8.mods:GalacticraftCore:1.7-3.0.12.504:Dev"
//compileOnly "micdoodle8.mods:MicdoodleCore:1.7-3.0.12.504:Dev"
//compileOnly "minechem:Minechem:1.7.10-6.0.407:dev"
//compileOnly "minetweaker:MineTweaker3:1.7.10-3.0.10:dev-full"
//compileOnly "mods.railcraft:Railcraft_1.7.10:9.12.3.0:dev"
//compileOnly "mrtjp:ForgeRelocation:0.0.1.4:dev"
//compileOnly "mrtjp:MrTJPCore:1.1.0.34:dev"
//compileOnly "mrtjp:ProjectRed:1.7.10-4.7.0pre11.52:dev"
//compileOnly "net.bdew:bdlib:1.9.4.110-mc1.7.10:dev"
//compileOnly "net.bdew:gendustry:1.6.4-133-mc1.7.10:dev"
//compileOnly "net.machinemuse:ModularPowersuits:1.7.10-0.11.1.114" // Hack
//compileOnly "net.machinemuse:Numina:0.4.1.105" // Hack
//compileOnly "net.sengir.forestry:forestry_1.7.10:4.2.16.64:dev"
compileOnly "openblocks:OpenBlocks:1.7.10-1.6-1.7.10:deobf"
compileOnly "openmods:OpenModsLib:1.7.10-0.10:deobf"
//compileOnly "pneumaticCraft:PneumaticCraft:1.7.10-1.12.7-153:userdev"
//compileOnly "powercrystals:MineFactoryReloaded:[1.7.10]2.8.2B1-201:dev"
//compileOnly "qmunity:QmunityLib:0.2.118:deobf"
//compileOnly "santa:hairy-spice:0.1:dev"
//compileOnly "team.chisel.ctmlib:CTMLib:MC1.7.10-1.4.1.5:deobf"
//compileOnly "team.chisel:Chisel:2.9.5.12:deobf"
//compileOnly "thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev"
//compileOnly "ttftcuts.atg:ATG:1.7.10-0.12.0:DEV"
//compileOnly "twilightforest:twilightforest:1.7.10-2.3.8dev:dev"
compileOnly "vazkii.botania:Botania:r1.8-250:deobf"
// real example
//compile 'com.googlecode.efficient-java-matrix-library:ejml:0.24' // adds ejml to the dev env
// for more info...
// http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html
// http://www.gradle.org/docs/current/userguide/dependency_management.html
}
task buildInfo {
def matcher = "v[0-9]*\\.[0-9]*\\.[0-9]*"
def cmdTag = "git describe --match '${matcher}' --abbrev=0 --exact-match --dirty"
def procTag = cmdTag.execute()
procTag.waitFor()
if (procTag.exitValue() == 0) {
ext.isRelease = true
ext.tag = "${procTag.text.trim().substring(1)}" // Full Release
ext.version = ext.tag
} else {
ext.isRelease = false
def cmdLat = "git describe --match ${matcher} --dirty"
def procLat = cmdLat.execute()
procLat.waitFor()
if (procLat.exitValue() == 0) {
ext.tag = procLat.text.trim().substring(1)
} else {
def cmdDes = "git describe --dirty"
def procDes = cmdDes.execute()
procDes.waitFor()
if (procDes.exitValue() == 0) {
ext.tag = "DEV-${procDes.text.trim()}"
} else {
ext.tag = "NOGIT" // No tags at all?!
}
}
if (System.getenv().VERSION_FALLBACK != null) {
ext.version = System.getenv().VERSION_FALLBACK
} else {
ext.version = ext.tag
}
}
}
if (System.getenv().ARTIFACT_VERSION == null) {
version = "${project.buildInfo.version}"
} else {
version = "${System.getenv().ARTIFACT_VERSION}"
}
processResources {
// this will ensure that this task is redone when the versions change.
inputs.property "version", project.buildInfo.tag
inputs.property "mcversion", project.minecraft.version
// replace stuff in mcmod.info, nothing else
from(sourceSets.main.resources.srcDirs) {
include 'mcmod.info'
// replace version and mcversion
expand 'version':project.buildInfo.tag, 'mcversion':project.minecraft.version
}
// copy everything else, thats not the mcmod.info
from(sourceSets.main.resources.srcDirs) {
exclude 'mcmod.info'
}
}
task devJar(type: Jar) {
from sourceSets.main.output
classifier = 'dev'
}
task sourcesJar(type: Jar) {
from sourceSets.main.allJava
classifier = 'sources'
}
artifacts {
archives devJar
archives sourcesJar
}
if (!hasProperty("mavenUsername")) {
ext.mavenUsername="${System.getenv().MAVEN_USERNAME}"
}
if (!hasProperty("mavenPassword")) {
ext.mavenPassword="${System.getenv().MAVEN_PASSWORD}"
}
if (!hasProperty("mavenURL")) {
ext.mavenURL="${System.getenv().MAVEN_URL}"
}
if (!project.buildInfo.tag.contains("-dirty") && (System.getenv().ONLY_RELEASES!="true" || project.buildInfo.isRelease) ) {
uploadArchives {
repositories {
mavenDeployer {
// uniqueVersion = false
repository(url: mavenURL) {
authentication(userName: mavenUsername, password: mavenPassword)
}
}
}
}
}