-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathbuild.gradle
269 lines (245 loc) · 9.51 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
buildscript {
repositories {
maven {
name = ":forge"
url = 'https://files.minecraftforge.net/maven'
}
maven {
url 'https://plugins.gradle.org/m2/'
}
jcenter()
mavenCentral()
}
dependencies {
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '4.+', changing: true
classpath "gradle.plugin.net.kyori:blossom:1.1.0"
}
}
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'net.minecraftforge.gradle'
apply plugin: "net.kyori.blossom"
apply plugin: 'eclipse'
apply plugin: 'maven-publish'
version = modVersion
group = modGroup
archivesBaseName = modBaseName
//noinspection GroovyAssignabilityCheck
project.ic2_range= "[${project.ic2_min_ver},${project.ic2_max_ver}]"
compileJava {
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
}
blossom {
replaceToken '%VERSION%', modVersion
replaceToken "%IC2_RANGE%", ic2_range
replaceToken "%CERTIFICATE%", fingerprint
}
sourceSets {
main {
java {
srcDirs = ["src/main/java"]
}
resources {
srcDirs = ["src/main/resources"]
}
}
}
minecraft {
//noinspection GroovyAssignabilityCheck
mappings channel: "snapshot", version: mcp_version
runs {
client {
workingDirectory project.file('run')
accessTransformer = file('src/main/resources/tc_at.cfg')
// Recommended logging data for a userdev environment
property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
// Recommended logging level for the console
property 'forge.logging.console.level', 'debug'
}
server {
// Recommended logging data for a userdev environment
property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
// Recommended logging level for the console
property 'forge.logging.console.level', 'debug'
}
data {
property 'forge.logging.console.level', 'debug'
workingDirectory project.file('run')
args '--mod', 'ssp', '--all',
'--existing', '"' + file('src/main/resources/') + '"',
'--existing', '"' + file('src/generated/resources/') + '"',
'--output', '"' + file('src/generated/resources/') + '"'
}
}
}
repositories {
maven {
name 'IC2'
url 'http://maven.ic2.player.to'
content {
includeGroup 'net.industrial-craft'
}
}
maven {
url "http://maven.cil.li"
}
maven {
url "https://www.cursemaven.com"
content {
includeGroup "curse.maven"
}
}
}
dependencies {
minecraft([
group : "net.minecraftforge",
name : "forge",
version: "${minecraft_version}-${forge_version}"
])
compileOnly "li.cil.oc:OpenComputers:MC1.12.2-1.7.2.67:api"
runtimeOnly "curse.maven:thaumcraft-223628:2629023"
runtimeOnly "curse.maven:botania-225643:2846950"
runtimeOnly "curse.maven:baubles-227083:2518667"
compileOnly "curse.maven:thaumcraft-223628:2629023"
compileOnly "curse.maven:wireless-industry-377164:3864415"
compileOnly "curse.maven:botania-225643:2846950"
compileOnly "curse.maven:baubles-227083:2518667"
compileOnly "curse.maven:projecte-226410:2702991"
runtimeOnly "curse.maven:projecte-226410:2702991"
compileOnly "curse.maven:ex-nihilo-creatio-274456:2817545"
runtimeOnly "curse.maven:ex-nihilo-creatio-274456:2817545"
compileOnly "curse.maven:forestry-59751:2684780"
runtimeOnly "curse.maven:forestry-59751:2684780"
compileOnly "curse.maven:patchouli-306770:3087124"
runtimeOnly "curse.maven:patchouli-306770:3087124"
compileOnly "curse.maven:avaritia-1-10-261348:3143349"
runtimeOnly "curse.maven:avaritia-1-10-261348:3143349"
runtimeOnly "curse.maven:cofh-core-69162:2920433"
compileOnly "curse.maven:cofh-core-69162:2920433"
runtimeOnly "curse.maven:immersive-engineering-231951:2974106"
compileOnly "curse.maven:immersive-engineering-231951:2974106"
runtimeOnly "curse.maven:thermal-expansion-69163:2926431"
compileOnly "curse.maven:thermal-expansion-69163:2926431"
runtimeOnly "curse.maven:journeymap-32274:2916002"
compileOnly "curse.maven:journeymap-32274:2916002"
runtimeOnly "curse.maven:wrapup-275153:2486198"
compileOnly "curse.maven:wrapup-266936:3294077"
runtimeOnly "curse.maven:shadowfacts-forgelin-248453:2785465"
compileOnly "curse.maven:shadowfacts-forgelin-248453:2785465"
runtimeOnly "curse.maven:crafttweaker-239197:3587830"
compileOnly "curse.maven:crafttweaker-239197:3587830"
runtimeOnly "curse.maven:tesla-core-lib-254602:3438487"
compileOnly "curse.maven:tesla-core-lib-254602:3438487"
runtimeOnly "curse.maven:thermal-expansion-69163:2926431"
compileOnly "curse.maven:thermal-expansion-69163:2926431"
runtimeOnly "curse.maven:thermal-dynamics-227443:2920505"
compileOnly "curse.maven:thermal-dynamics-227443:2920505"
runtimeOnly "curse.maven:thermal-foundation-222880:2926428"
compileOnly "curse.maven:thermal-foundation-222880:2926428"
runtimeOnly "curse.maven:modtweaker-220954:3488553"
compileOnly "curse.maven:modtweaker-220954:3488553"
runtimeOnly "curse.maven:just-enough-resources-jer-240630:2728585"
compileOnly "curse.maven:just-enough-resources-jer-240630:2728585"
runtimeOnly "curse.maven:jei-integration-265917:2951731"
compileOnly "curse.maven:jei-integration-265917:2951731"
runtimeOnly "curse.maven:mtlib-253211:3308160"
compileOnly "curse.maven:mtlib-253211:3308160"
runtimeOnly "curse.maven:external-tweaker-270558:2452858"
compileOnly "curse.maven:external-tweaker-270558:2452858"
runtimeOnly "curse.maven:redstone-arsenal-70631:2939416"
compileOnly "curse.maven:redstone-arsenal-70631:2939416"
runtimeOnly "curse.maven:redstone-flux-270789:2920436"
compileOnly "curse.maven:redstone-flux-270789:2920436"
runtimeOnly "curse.maven:thermal-dynamics-227443:2920505"
compileOnly "curse.maven:thermal-dynamics-227443:2920505"
runtimeOnly "curse.maven:thermal-foundation-222880:2926428"
compileOnly "curse.maven:thermal-foundation-222880:2926428"
runtimeOnly "curse.maven:draconic-evolution-223565:3431261"
compileOnly "curse.maven:draconic-evolution-223565:3431261"
runtimeOnly "curse.maven:brandons-core-231382:3408276"
compileOnly "curse.maven:brandons-core-231382:3408276"
runtimeOnly "curse.maven:cofh-world-271384:2920434"
compileOnly "curse.maven:cofh-world-271384:2920434"
runtimeOnly "curse.maven:cucumber-272335:2645867"
compileOnly "curse.maven:cucumber-272335:2645867"
runtimeOnly "curse.maven:ae2-extended-life-570458:4323863"
compileOnly "curse.maven:ae2-extended-life-570458:4323863"
compileOnly "curse.maven:galacticraft-legacy-564236:4052975"
compileOnly "curse.maven:ender-io-64578:3328811"
runtimeOnly "curse.maven:compact-machines-224218:2707509"
compileOnly "curse.maven:compact-machines-224218:2707509"
runtimeOnly "curse.maven:the-one-probe-245211:2667280"
compileOnly "curse.maven:the-one-probe-245211:2667280"
runtimeOnly "curse.maven:top-addons-247111:2887479"
compileOnly "curse.maven:top-addons-247111:2887479"
runtimeOnly fileTree('lib')
compileOnly fileTree('lib')
compileOnly fileTree('libs')
}
processResources {
inputs.property "version", project.version
inputs.property "mcversion", project.minecraft_version
from(sourceSets.main.resources.srcDirs) {
include "mcmod.info"
expand "version": project.version, "mcversion": project.minecraft_version,
"ic2_range": project.ic2_range
}
from(sourceSets.main.resources.srcDirs) {
exclude "mcmod.info"
}
rename '(.+_at.cfg)', 'META-INF/$1'
}
def commonManifest = {
attributes 'FMLAT': 'tc_at.cfg'
}
jar {
manifest {
attributes([
"Specification-Title": project.name,
"Specification-Vendor": "ijo42",
"Specification-Version": "1", // We are version 1 of ourselves
"Implementation-Title": project.name,
"Implementation-Version": project.version,
"Implementation-Vendor" :"Denfop",
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"),
"Git-Commit-Hash": getGitHash()
])
}
from 'LICENSE'
manifest commonManifest
from sourceSets.main.output.classesDirs
from sourceSets.main.output.resourcesDir
}
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
options.incremental = true // one flag, and things will get so MUCH faster
sourceCompatibility = targetCompatibility = '1.8'
}
jar.archiveFileName = "${project.archivesBaseName}-${project.minecraft_version}-${project.version}.jar"
jar.finalizedBy('reobfJar')
defaultTasks 'build'
static def getGitHash() {
try {
def process = 'git rev-parse --short HEAD'.execute()
process.waitFor()
return (process.exitValue() ? 'unknown' : process.text.trim())
}catch(IOException ignored){
return 'unknown'
}
}
// Hack to include resources for Forge 1.12.2 using FG3
sourceSets { main { output.resourcesDir = output.classesDirs[0] } }
task devJar(type: Jar) {
classifier = 'dev'
from sourceSets.main.output
}
task sourcesJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allSource
}
artifacts {
archives devJar
archives sourcesJar
}