-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.gradle
383 lines (327 loc) · 14.9 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
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
buildscript {
repositories {
jcenter()
maven { url = "https://files.minecraftforge.net/maven" }
maven { url = "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath "net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT"
classpath "gradle.plugin.com.matthewprenger:CurseGradle:1.4.0"
}
}
apply plugin: "net.minecraftforge.gradle.forge"
apply plugin: "com.matthewprenger.cursegradle"
//Only edit below this line, the above code adds and enables the necessary things for Forge to be setup.
parseConfig(file("private.properties"))
@SuppressWarnings("GrMethodMayBeStatic")
def parseConfig(File config) {
config.withReader {
def prop = new Properties()
prop.load(it)
def obj = new ConfigSlurper().parse(prop).iterator()
while (obj.hasNext()) {
def entry = obj.next()
ext.setProperty(entry.key.toString(), entry.value)
}
}
}
version = "1.12.2-0.2.2a"
group = "com.github.sokyranthedragon.mia" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "mia"
sourceCompatibility = targetCompatibility = '1.8' // Need this here so eclipse task generates correctly.
compileJava {
sourceCompatibility = targetCompatibility = '1.8'
}
repositories {
maven {
url = "https://www.cursemaven.com"
}
maven {
// Using CurseForge did not work for me, so I'm using this maven repo instead.
name = "EnderCore"
url = "http://maven.tterrag.com"
}
maven {
name = "ilexiconn" // LLibrary, had issues with CurseForge, it seems to require llibrary-core
url = "https://maven.mcmoddev.com"
}
}
minecraft {
version = "1.12.2-14.23.5.2847"
runDir = "run"
// the mappings can be changed at any time, and must be in the following format.
// snapshot_YYYYMMDD snapshot are built nightly.
// stable_# stables are built at the discretion of the MCP team.
// Use non-default mappings at your own risk. they may not always work.
// simply re-run your setup task after changing the mappings to update your workspace.
mappings = "stable_39"
// makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.
}
dependencies {
// Any local dependencies
compile fileTree(dir: 'libs', include: ['*.jar'])
// Actual dependency for some new features
if (project.run_artemislib.equals("true"))
deobfProvided "curse.maven:ArtemisLib_1.12.2_v1.0.6-313590:2741812"
else
compileOnly "curse.maven:ArtemisLib_1.12.2_v1.0.6-313590:2741812"
// The One Probe
deobfProvided "curse.maven:TheOneProbe_1.4.28-245211:2667280"
boolean kotlinSupport = false
boolean runBaubles = false
// Extra Utilities 2
if (project.run_xu2.equals("true"))
deobfProvided "curse.maven:ExtraUtilities_1.9.9-225561:2678374"
else
compileOnly "curse.maven:ExtraUtilities_1.9.9-225561:2678374"
// Hatchery and chickens
if (project.run_chickens.equals("true")) {
deobfProvided "curse.maven:Hatchery_2.2.2-251138:2715498"
deobfProvided "curse.maven:Chickens_6.1.0-241941:2545467"
deobfProvided "curse.maven:MoreChickens_3.1.0-251786:2521137"
} else {
compileOnly "curse.maven:Hatchery_2.2.2-251138:2715498"
compileOnly "curse.maven:Chickens_6.1.0-241941:2545467"
compileOnly "curse.maven:MoreChickens_3.1.0-251786:2521137"
}
// Thaumcraft
if (project.run_thaumcraft.equals("true")) {
runBaubles = true
deobfProvided "curse.maven:Thaumcraft_6.1.BETA26-223628:2629023"
deobfProvided "curse.maven:Thaumic_Jei_1.6.0-27-285492:2705304"
} else {
compileOnly "curse.maven:Thaumcraft_6.1.BETA26-223628:2629023"
compileOnly "curse.maven:Thaumic_Jei_1.6.0-27-285492:2705304"
}
// JEI and addons
deobfProvided "curse.maven:JEI_4.15.0.302-238222:3043174"
deobfProvided "curse.maven:JER_0.9.2.60-240630:2728585"
// Mantle, Tinker, Tinker's submods, and mods requiring mantle
if (project.run_tinkers.equals("true") || project.run_natura.equals("true"))
deobfProvided "curse.maven:Mantle_1.3.3.55-74924:2713386"
else
compileOnly "curse.maven:Mantle_1.3.3.55-74924:2713386"
if (project.run_tinkers.equals("true"))
deobfProvided "curse.maven:TinkersConstruct_12.0.183-74072:2902483"
else
compileOnly "curse.maven:TinkersConstruct_12.0.183-74072:2902483"
if (project.run_natura.equals("true"))
deobfProvided "curse.maven:Natura_4.3.2.69-74120:2711439"
else
compileOnly "curse.maven:Natura_4.3.2.69-74120:2711439"
// Ice and Fire
// deobfProvided "llibrary:llibrary-1.7.18:1.12.2:dev"
if (project.run_iceandfire.equals("true") || true) {
// Temporarily always run no matter what, it won't work otherwise
deobfProvided "net.ilexiconn:llibrary:1.7.19-1.12.2:dev"
deobfProvided "net.ilexiconn:llibrary-core:1.0.11-1.12.2"
deobfProvided "curse.maven:iceandfire-1.9.1-264231:2939529"
} else {
compileOnly "net.ilexiconn:llibrary:1.7.19-1.12.2:dev"
compileOnly "net.ilexiconn:llibrary-core:1.0.11-1.12.2"
compileOnly "curse.maven:iceandfire-1.9.1-264231:2803425"
}
// Ender IO
// deobfProvided "curse.maven:EnderCore_1.12.2-0.5.73:2822401"
// deobfProvided "curse.maven:EnderCore_1.12.2-0.5.73-api:2822402"
// deobfProvided "endercore:EnderCore:1.12.2:0.5.57"
// deobfdeobfProvided "ender-io:EnderIO:1.12.2:5.0.43"
// Thermal Expansion and dependencies
if (project.run_thermal.equals("true")) {
deobfProvided "curse.maven:CodeChickenLib_3.2.3.358-242818:2779848"
deobfProvided "curse.maven:RedstoneFlux_2.1.1.1-270789:2920436"
deobfProvided "curse.maven:CoFHCore_4.6.6.1-69162:2920433"
deobfProvided "curse.maven:CoFHWorld_1.4.0.1-271384:2920434"
deobfProvided "curse.maven:ThermalDynamics_2.5.6.1-227443:2920505"
deobfProvided "curse.maven:ThermalFoundation_2.6.7.1-222880:2926428"
deobfProvided "curse.maven:ThermalExpansion_5.5.7.1-69163:2926431"
} else {
compileOnly "curse.maven:CodeChickenLib_3.2.3.358-242818:2779848"
compileOnly "curse.maven:RedstoneFlux_2.1.1.1-270789:2920436"
compileOnly "curse.maven:CoFHCore_4.6.6.1-69162:2920433"
compileOnly "curse.maven:CoFHWorld_1.4.0.1-271384:2920434"
compileOnly "curse.maven:ThermalDynamics_2.5.6.1-227443:2920505"
compileOnly "curse.maven:ThermalFoundation_2.6.7.1-222880:2926428"
compileOnly "curse.maven:ThermalExpansion_5.5.7.1-69163:2926431"
}
// Mo' Creatures
if (project.run_mocreatures.equals("true")) {
provided "curse.maven:CustomMobSpawner-3.11.5-229261:2859433"
provided "curse.maven:MoCreatures_12.0.5-229260:2628698"
}
else {
compileOnly "curse.maven:CustomMobSpawner-3.11.5-229261:2859433"
compileOnly "curse.maven:MoCreatures_12.0.5-229260:2628698"
}
// Dungeon tactics
if (project.run_dungeon_tactics.equals("true"))
deobfProvided "curse.maven:DungeonTactics_0.16.9-242500:3008088"
else
compileOnly "curse.maven:DungeonTactics_0.16.9-242500:3008088"
// Harvestcraft
// For use with deobfuscated code, provide the original source for IntelliJ Idea
// https://github.com/MatrexsVigil/harvestcraft
if (project.run_harvestcraft.equals("true")) {
provided "curse.maven:PamsHarvestcraft_1.12.2zg-221857:2904825"
deobfProvided "curse.maven:JustEnoughHarvestcraft_1.12.2-1.7.2-267939:2997129"
} else {
compileOnly "curse.maven:PamsHarvestcraft_1.12.2zg-221857:2904825"
compileOnly "curse.maven:JustEnoughHarvestcraft_1.12.2-1.7.2-267939:2997129"
}
// Botania and friends
if (project.run_botania.equals("true")) {
runBaubles = true
deobfProvided "curse.maven:Bontina_r1.10-363-225643:2846950"
deobfProvided "curse.maven:ExtraBontina_r1.1-60-beta-hotfix-299086:3112313"
} else {
compileOnly "curse.maven:Bontina_r1.10-363-225643:2846950"
compileOnly "curse.maven:ExtraBontina_r1.1-60-beta-hotfix-299086:3112313"
}
// Quark
if (project.run_quark.equals("true")) {
deobfProvided "curse.maven:AutoRegLib_1.3-32-250363:2746011"
deobfProvided "curse.maven:Quark_r1.6-179-243121:2924091"
} else {
compileOnly "curse.maven:AutoRegLib_1.3-32-250363:2746011"
compileOnly "curse.maven:Quark_r1.6-179-243121:2924091"
}
// Charm
if (project.run_charm.equals("true"))
deobfProvided "curse.maven:Charm-1.12.2-1.4.1-318872:3146596"
else
compileOnly "curse.maven:Charm-1.12.2-1.4.1-318872:3146596"
// Craft Tweaker
if (project.run_craft_tweaker.equals("true"))
provided "curse.maven:CraftTweaker2_1.12-4.1.20.646-239197:3294372"
else
compileOnly "curse.maven:CraftTweaker2_1.12-4.1.20.646-239197:3294372"
if (project.run_future_mc.equals("true")) {
kotlinSupport = true
deobfProvided "curse.maven:FutureMC_0.2.9-310059:3722997"
}
else
compileOnly "curse.maven:FutureMC_0.2.9-310059:3722997"
if (project.run_biomes_o_plenty.equals("true"))
deobfProvided "curse.maven:Biomes_O_Plenty_7.0.1.2444-220318:2842510"
else
compileOnly "curse.maven:Biomes_O_Plenty_7.0.1.2444-220318:2842510"
if (project.run_ctm_chisel.equals("true")) {
deobfProvided "curse.maven:CTM_1.0.1.31-267602:2915363"
deobfProvided "curse.maven:Chisel_1.0.2.45-235279:2915375"
} else {
compileOnly "curse.maven:CTM_1.0.1.31-267602:2915363"
compileOnly "curse.maven:Chisel_1.0.2.45-235279:2915375"
}
if (project.run_industrial_foregoing.equals("true")) {
kotlinSupport = true
deobfProvided "curse.maven:Tesla_1.12.2-1.0.63_deobf-244651:2487962"
deobfProvided "curse.maven:TeslaCoreLib_1.12.2-1.0.17.25_deobf-254602:2891843"
deobfProvided "curse.maven:IndustrialForegoing_1.12.2-1.12.13-237_deobf-266515:2745324"
deobfProvided "curse.maven:GunpowderLib-1.12.2-1.1-356646:3168863"
deobfProvided "curse.maven:IntegrationForegoing_1.12.2-1.11-277938:3200529"
} else {
compileOnly "curse.maven:Tesla_1.12.2-1.0.63_deobf-244651:2487962"
compileOnly "curse.maven:TeslaCoreLib_1.12.2-1.0.17.25_deobf-254602:2891843"
compileOnly "curse.maven:IndustrialForegoing_1.12.2-1.12.13-237_deobf-266515:2745324"
compileOnly "curse.maven:GunpowderLib-1.12.2-1.1-356646:3168863"
compileOnly "curse.maven:IntegrationForegoing_1.12.2-1.11-277938:3200529"
}
if (project.run_aether.equals("true")) {
deobfProvided "curse.maven:Aether_Legacy_1.12.2-v1.5.3.2-255308:3280119"
deobfProvided "curse.maven:Extra_Moas_v1.2.1-299061:3039636"
deobfProvided "curse.maven:Aether_Continuation_v1.3.0-294269:3070803"
deobfProvided "curse.maven:Lost_Aether_Content_1.12.2-v1.0.2-318602:3038185"
}
else {
compileOnly "curse.maven:Aether_Legacy_1.12.2-v1.5.3.2-255308:3280119"
compileOnly "curse.maven:Extra_Moas_v1.2.1-299061:3039636"
compileOnly "curse.maven:Aether_Continuation_v1.3.0-294269:3070803"
compileOnly "curse.maven:Lost_Aether_Content_1.12.2-v1.0.2-318602:3038185"
}
// Extract META-INF/libraries/EnderCore-1.12.2-x.y.z-core.jar from Ender Core jar into libs directory
deobfProvided "curse.maven:Ender_Core_1.12.2-0.5.76-231868:2972849"
if (project.run_enderio.equals("true")) {
// Same as with EnderCore, but AutoConfig and AutoSave
deobfProvided "curse.maven:Ender_IO_1.12.2-5.2.66-64578:3124452"
if (project.run_enderzoo.equals("true"))
deobfProvided "curse.maven:Ender_Zoo_1.12.2-5.2.59-303001:2989199"
else
compileOnly "curse.maven:Ender_Zoo_1.12.2-5.2.66-303001:3124449"
}
else {
compileOnly "curse.maven:Ender_IO_1.12.2-5.2.66-64578:3124452"
compileOnly "curse.maven:Ender_Zoo_1.12.2-5.2.66-303001:3124449"
}
if (kotlinSupport)
deobfProvided "curse.maven:Forgelin_1.8.4-1.12.2-248453:2785465"
else
compileOnly "curse.maven:Forgelin_1.8.4-1.12.2-248453:2785465"
if (runBaubles || project.run_baubles.equals("true"))
deobfProvided "curse.maven:Baubles_1.5.2-227083:2518667"
else
compileOnly "curse.maven:Baubles_1.5.2-227083:2518667"
}
curseforge {
apiKey = project.api_key
project {
id = "358821"
changelog = file("upload_changelog.txt")
releaseType = "beta"
mainArtifact(jar) {
displayName = "MIA $project.version"
relations {
optionalDependency "artemislib"
optionalDependency "biomes-o-plenty"
optionalDependency "baubles"
optionalDependency "botania"
optionalDependency "charm"
optionalDependency "chickens"
optionalDependency "chisel"
optionalDependency "cofh-core"
optionalDependency "ctm"
optionalDependency "dungeon-tactics"
optionalDependency "ender-io"
optionalDependency "ender-io-zoo"
optionalDependency "extra-utilities"
optionalDependency "extrabotany"
optionalDependency "future-mc"
optionalDependency "hatchery"
optionalDependency "ice-and-fire-dragons"
optionalDependency "industrial-foregoing"
optionalDependency "jei"
optionalDependency "just-enough-resources-jer"
optionalDependency "mo-creatures"
optionalDependency "natura"
optionalDependency "pams-harvestcraft"
optionalDependency "quark"
optionalDependency "thaumcraft"
optionalDependency "the-one-probe"
optionalDependency "thermal-expansion"
optionalDependency "thermal-foundation"
optionalDependency "tinkers-construct"
optionalDependency "aether"
optionalDependency "aether-addon"
optionalDependency "aether-lost-content"
}
}
options {
//noinspection GrDeprecatedAPIUsage
debug = true // Leave as true unless publishing, prevents accidental uploads
}
}
}
processResources {
// this will ensure that this task is redone when the versions change.
inputs.property "version", project.version
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.version, 'mcversion': project.minecraft.version
}
// copy everything else except the mcmod.info
from(sourceSets.main.resources.srcDirs) {
exclude 'mcmod.info'
}
}