-
Notifications
You must be signed in to change notification settings - Fork 9
/
build.gradle
252 lines (232 loc) · 8.94 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
plugins {
id "dev.architectury.loom" version "1.3-SNAPSHOT"
id "maven-publish"
}
base {
archivesName = project.archives_base_name
}
version = project.mod_version
mod_id = project.mod_id
mod_author = project.mod_author
group = project.maven_group
def modId = project.mod_id
def generatedResources = file("src/generated")
java {
sourceCompatibility = targetCompatibility = JavaVersion.VERSION_17
}
loom {
// use this if you are using the official mojang mappings
// and want loom to stop warning you about their license
silentMojangMappingsLicense()
// since loom 0.10, you are **required** to use the
// "forge" block to configure forge-specific features,
// such as the mixinConfigs array or datagen
forge {
// specify the mixin configs used in this mod
// this will be added to the jar manifest as well!
mixinConfigs = [
"${modId}.mixins.json"
]
// missing access transformers?
// don't worry, you can still use them!
// note that your AT *MUST* be located at
// src/main/resources/META-INF/accesstransformer.cfg
// to work as there is currently no config option to change this.
// also, any names used in your access transformer will need to be
// in SRG mapped ("func_" / "field_" with MCP class names) to work!
// (both of these things may be subject to change in the future)
}
runs {
configureEach {
vmArg "-Dproduction=true"
}
data {
data()
programArgs "--all", "--mod", modId
programArgs "--output", generatedResources.absolutePath
programArgs "--existing", file("src/main/resources").absolutePath
}
}
}
sourceSets {
main {
resources.srcDir generatedResources
}
}
repositories {
mavenCentral()
maven {
name 'FirstDarkDev'
url "https://maven.firstdarkdev.xyz/snapshots/"
}
maven {
name 'Quilt'
url 'https://maven.quiltmc.org/repository/release/'
}
maven {
name = 'ParchmentMC'
url = 'https://maven.parchmentmc.org'
}
maven {
url "https://maven.saps.dev/releases/"
content {
includeGroup "dev.latvian.mods"
}
}
maven { // Registrate
url = "https://maven.tterrag.com/"
content {
// need to be specific here due to version overlaps
includeGroup("com.jozufozu.flywheel")
includeGroup("com.tterrag.registrate")
includeGroup("com.simibubi.create")
}
}
maven {
// Patchouli, JEI
name = "BlameJared"
url = "https://maven.blamejared.com/"
}
maven {
url = "https://maven.theillusivec4.top/"
}
maven {
// Curse Forge File
url "https://cursemaven.com/"
content {
includeGroup "curse.maven"
}
}
maven { // FTB Mods
url "https://maven.saps.dev/releases"
content {
includeGroup "dev.latvian.mods"
includeGroup "dev.ftb.mods"
}
}
maven {
url "https://maven.saps.dev/snapshots"
content {
includeGroup "dev.latvian.mods"
includeGroup "dev.ftb.mods"
}
}
maven {
url "https://maven.ftb.dev/snapshots"
content {
includeGroup "dev.ftb.mods"
}
}
maven {
url "https://maven.ithundxr.dev/releases"
content {
includeGroup "com.railwayteam.railways"
}
}
maven {
name = 'GTCEu Maven'
url = 'https://maven.gtceu.com'
content {
includeGroup 'com.gregtechceu.gtceu'
}
}
flatDir {
dir 'libs'
}
}
dependencies {
minecraft "com.mojang:minecraft:${project.minecraft_version}"
forge "net.minecraftforge:forge:${project.minecraft_version}-${project.forge_version}"
// layered mappings - Mojmap names, parchment and QM docs and parameters
mappings loom.layered {
it.mappings("org.quiltmc:quilt-mappings:${project.minecraft_version}+build.${project.quilt_mappings}:intermediary-v2")
it.parchment("org.parchmentmc.data:parchment-${project.minecraft_version}:${project.parchment_mappings}@zip")
it.officialMojangMappings { nameSyntheticMembers = false }
}
modCompileOnly("mezz.jei:jei-${project.minecraft_version}-forge-api:${project.jei_version}") { transitive = false }
modCompileOnly("mezz.jei:jei-${project.minecraft_version}-common-api:${project.jei_version}") { transitive = false }
//
modImplementation("com.gregtechceu.gtceu:gtceu-${project.minecraft_version}:${project.gtceu_version}") { transitive = false }
modImplementation("com.lowdragmc.ldlib:ldlib-forge-${project.minecraft_version}:${project.ldlib_version}") { transitive = false }
modImplementation("com.tterrag.registrate:Registrate:${project.registrate_version}")
modImplementation("dev.latvian.mods:kubejs-forge:${project.kubejs_version}")
modImplementation("curse.maven:tfcambiental-940350:${project.tfcambiental_file}")
modImplementation("curse.maven:terrafirmacraft-302973:${project.terrafirmacraft_file}")
modImplementation("dev.ftb.mods:ftb-chunks-forge:${project.ftb_chunks_version}") { transitive = false }
modImplementation("dev.ftb.mods:ftb-library-forge:${project.ftb_library_version}") { transitive = false }
modImplementation("dev.ftb.mods:ftb-teams-forge:${project.ftb_teams_version}") { transitive = false }
//
modImplementation("com.jozufozu.flywheel:flywheel-forge-1.20.1:0.6.11-13")
modImplementation("com.simibubi.create:create-1.20.1:0.5.1.h-48:all") { transitive = false }
modImplementation("curse.maven:ice-and-fire-dragons-264231:5122408")
modImplementation("curse.maven:citadel-331936:4848887")
modImplementation("curse.maven:firmalife-453394:5775257")
modImplementation("curse.maven:apotheosis-313970:5145344")
modImplementation("curse.maven:attributeslib-898963:5634071")
modImplementation("curse.maven:framework-549225:5811593")
modImplementation("curse.maven:placebo-283644:5414631")
modImplementation("curse.maven:scorched-guns-802940:5741395")
modRuntimeOnly("vazkii.patchouli:Patchouli:${project.minecraft_version}-${project.patchouli_version}-FORGE")
modRuntimeOnly("top.theillusivec4.curios:curios-forge:${project.curios_version}+${project.minecraft_version}")
modRuntimeOnly("dev.toma.configuration:configuration-forge-${project.minecraft_version}:${project.configuration_version}")
modRuntimeOnly("mezz.jei:jei-${project.minecraft_version}-forge:${project.jei_version}") { transitive = false }
modRuntimeOnly("curse.maven:jade-324717:5072729")
//
// // Mixin Extras
implementation(annotationProcessor("io.github.llamalad7:mixinextras-common:${project.mixinextras_version}"))
implementation(include("io.github.llamalad7:mixinextras-forge:${project.mixinextras_version}"))
//
// // lombok
compileOnly 'org.projectlombok:lombok:1.18.24'
annotationProcessor 'org.projectlombok:lombok:1.18.24'
}
processResources {
// define properties that can be used during resource processing
inputs.property "version", version
filesMatching("META-INF/mods.toml") {
expand "version": version
}
}
tasks.withType(JavaCompile).configureEach {
// ensure that the encoding is set to UTF-8, no matter what the system default is
// this fixes some edge cases with special characters not displaying correctly
// see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html
// If Javadoc is generated, this must be specified in that task too.
options.encoding = "UTF-8"
options.release = 17
}
java {
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
// if it is present.
// If you remove this line, sources will not be generated.
withSourcesJar()
}
jar {
// add some additional metadata to the jar manifest
manifest {
attributes([
"Specification-Title" : mod_id,
"Specification-Vendor" : mod_author,
"Specification-Version" : "1",
"Implementation-Title" : project.name,
"Implementation-Version" : version,
"Implementation-Vendor" : mod_author,
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
])
}
}
// configure the maven publication
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
}
}
// See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
repositories {
// Add repositories to publish to here.
// Notice: This block does NOT have the same function as the block in the top level.
// The repositories here will be used for publishing your artifact, not for
// retrieving dependencies.
}
}