forked from InnovativeOnlineIndustries/Industrial-Foregoing
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
285 lines (246 loc) · 8.17 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
import se.bjurr.gitchangelog.plugin.gradle.GitChangelogTask
buildscript {
repositories {
jcenter()
mavenCentral()
maven { url = "https://files.minecraftforge.net/maven" }
maven {
url "https://plugins.gradle.org/m2/"
}
}
configurations {
classpath.resolutionStrategy {
cacheDynamicVersionsFor 10, 'seconds'
cacheChangingModulesFor 0, 'seconds'
}
}
dependencies {
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '3.+', changing: true
classpath "gradle.plugin.com.matthewprenger:CurseGradle:1.4.0"
}
}
plugins {
id "com.github.hierynomus.license" version "0.14.0"
id 'java'
id 'maven-publish'
id "com.matthewprenger.cursegradle" version "1.4.0"
id "se.bjurr.gitchangelog.git-changelog-gradle-plugin" version "1.64"
}
apply plugin: 'net.minecraftforge.gradle'
apply plugin: 'eclipse'
def isReleaseBranch = System.getenv("BRANCH") == "release-1.15" || System.getenv("BRANCH") == "release-1.16";
def BUILD_NUMBER = System.getenv("COMMIT") ? "${project.api_version}-${System.getenv("COMMIT")}" : "${project.api_version}"
group = "com.buuz135"
archivesBaseName = "industrial-foregoing"
version = "${minecraftVersion}-$BUILD_NUMBER"
sourceCompatibility = targetCompatibility = '1.8'
compileJava {
sourceCompatibility = targetCompatibility = '1.8'
}
minecraft {
mappings channel: 'snapshot', version: '20200916-1.16.2'
runs {
client {
workingDirectory project.file('run')
// 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'
property 'mixin.env.disableRefMap', 'true'
mods {
industrialforegoing {
source sourceSets.main
}
}
}
server {
workingDirectory project.file('run')
// 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'
property 'mixin.env.disableRefMap', 'true'
mods {
industrialforegoing {
source sourceSets.main
}
}
}
data {
workingDirectory project.file('run')
// 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'
property 'mixin.env.disableRefMap', 'true'
// Specify the modid for data generation, where to output the resulting resource, and where to look for existing resources.
args '--mod', 'industrialforegoing', '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/')
mods {
industrialforegoing {
source sourceSets.main
}
}
}
}
}
// Include resources generated by data generators.
sourceSets.main.resources { srcDir 'src/generated/resources' }
repositories {
mavenCentral()
jcenter()
maven {
// location of the maven that hosts JEI files
name = "Progwml6 maven"
url = "https://dvs1.progwml6.com/files/maven/"
}
maven {
url "https://maven.tterrag.com/"
}
maven {
// location of a maven mirror for JEI files, as a fallback
name = "ModMaven"
url = "https://modmaven.k-4u.nl"
}
maven {
url 'https://cdn.hrzn.studio/maven/'
}
maven {
name 'jared maven'
url "https://maven.blamejared.com/"
}
maven {
url 'https://www.dogforce-games.com/maven/'
}
maven {
url = "https://www.cursemaven.com"
}
}
dependencies {
minecraft 'net.minecraftforge:forge:1.16.4-35.0.0'
if (findProject(':titanium') != null) {
compile project(':titanium')
} else {
compile fg.deobf (project.dependencies.create('com.hrznstudio:titanium:1.16.4-3.2.2'))
}
//if (findProject(':workspace') == null) {
compileOnly fg.deobf("mezz.jei:jei-1.16.4:7.6.0.58:api")
// at runtime, use the full JEI jar
runtimeOnly fg.deobf("mezz.jei:jei-1.16.4:7.6.0.58")
//}
compileOnly fg.deobf("blusunrize.immersiveengineering:ImmersiveEngineering:1.16.3-4.1.0-+")
compileOnly fg.deobf("vazkii.patchouli:Patchouli:1.16.2+:api")
runtimeOnly fg.deobf("vazkii.patchouli:Patchouli:1.16.2+")
//runtimeOnly fg.deobf("curse.maven:zycraft:3099577")
compileOnly fg.deobf("curse.maven:farmers-delight-398521:3091999")
}
afterEvaluate {
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xmaxerrs" << "2000"
}
}
processResources {
// this will ensure that this task is redone when the versions change.
inputs.property 'version', project.version
inputs.property 'mcversion', '1.16.3'
// replace stuff in mcmod.info, nothing else
from(sourceSets.main.resources.srcDirs) {
include 'META_INF/mods.toml'
// replace version and mcversion
expand 'version':project.version, 'mcversion': '1.16.3'
}
// copy everything else except the mcmod.info
from(sourceSets.main.resources.srcDirs) {
exclude 'META_INF/mods.toml'
}
}
task apiJar(type: Jar, dependsOn: 'classes') {
classifier = 'api'
from(sourceSets.main.output) {
include 'com/buuz135/industrial/api/**'
}
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
task deobfJar(type:Jar) {
from sourceSets.main.output
classifier 'deobf'
}
artifacts {
archives sourcesJar
archives deobfJar
archives apiJar
}
publishing {
publications {
mavenJava(MavenPublication) {
artifact jar
artifact sourcesJar
artifact deobfJar
artifact apiJar
}
}
repositories {
maven {
url "s3://cdn.hrzn.studio/maven"
authentication {
awsIm(AwsImAuthentication)
}
}
}
}
license {
header rootProject.file('HEADER')
include "**/*.java"
ext.year = Calendar.getInstance().get(Calendar.YEAR)
ext.name = 'Buuz135'
ext.project = "Industrial Foregoing"
ignoreFailures = true
mapping {
java='SLASHSTAR_STYLE'
}
}
jar {
manifest {
attributes([
"Specification-Title": "Industrial Foregoing",
"Specification-Vendor": "Buuz135",
"Specification-Version": "2.0", // We are version 1 of ourselves
"Implementation-Title": project.name,
"Implementation-Version": "${project.api_version}",
"Implementation-Vendor" :"Buuz135",
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
])
}
}
tasks.curseforge.enabled = System.getenv("CURSE_API") != null && isReleaseBranch
curseforge {
if (System.getenv("CURSE_API") != null) {
apiKey = System.getenv("CURSE_API")
}
project {
id = '266515'
changelog = "https://github.com/InnovativeOnlineIndustries/Industrial-Foregoing/blob/changelog/CHANGELOG.md"
changelogType = 'markdown'
releaseType = 'beta'
addGameVersion '1.16.3'
addGameVersion '1.16.4'
mainArtifact(jar){
relations {
requiredLibrary 'titanium'
requiredLibrary 'patchouli'
}
}
addArtifact sourcesJar
addArtifact deobfJar
}
}
task makeChangelog(type: GitChangelogTask) {
file = new File("CHANGELOG.md")
untaggedName = "Version ${project.version}"
//fromCommit = "6a5a3df3665643ea181873312e3801db7c662686"
fromRef = "refs/tags/2.3.0"
toRef = "release-1.16"
templateContent = file("changelog.mustache").getText("UTF-8")
}