forked from FrozenBlock/WilderWild
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
268 lines (226 loc) · 7.43 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
plugins {
id 'fabric-loom' version '1.0-SNAPSHOT'
id 'io.github.juuxel.loom-quiltflower' version '1.7.+'
//id 'org.quiltmc.quilt-mappings-on-loom' version '4.2.1'
id 'maven-publish'
id 'eclipse'
id 'idea'
id 'java-library'
}
archivesBaseName = project.archives_base_name
version = getVersion()
group = project.maven_group
def local_frozenlib = findProject(':FrozenLib') != null
loom {
mixin {
defaultRefmapName = "mixins.wilderwild.refmap.json"
}
accessWidenerPath = file("src/main/resources/wilderwild.accesswidener")
interfaceInjection {
// When enabled injected interfaces from dependecies will be applied.
enableDependencyInterfaceInjection = false
}
}
configurations {
includeModImplementation
includeImplementation
include.extendsFrom includeImplementation
include.extendsFrom includeModImplementation
implementation.extendsFrom includeImplementation
modImplementation.extendsFrom includeModImplementation
}
repositories {
// Add repositories to retrieve artifacts from in here.
// You should only use this when depending on other mods because
// Loom adds the essential maven repositories to download Minecraft and libraries from automatically.
maven {
url = 'https://jitpack.io'
}
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
content {
includeGroup "maven.modrinth"
}
}
maven {
url = 'https://maven.terraformersmc.com'
content {
includeGroup "com.terraformersmc"
}
}
maven {
url = 'https://maven.shedaniel.me/'
}
maven {
url 'https://cursemaven.com'
content {
includeGroup "curse.maven"
}
}
/*maven {
name "Siphalor's Maven"
url "https://maven.siphalor.de"
}*/
maven {
url "https://maven.flashyreese.me/releases"
}
maven {
url "https://maven.flashyreese.me/snapshots"
}
maven {
url = 'https://maven.minecraftforge.net/'
}
maven {
url = "https://maven.oroarmor.com"
}
maven {
url = 'https://maven.parchmentmc.org'
}
flatDir {
dirs 'libs'
}
}
dependencies {
// To change the versions see the gradle.properties file
minecraft "com.mojang:minecraft:${minecraft_version}"
//mappings loom.officialMojangMappings()
mappings(loom.layered {
// please annoy treetrain if this doesnt work
it.mappings("org.quiltmc:quilt-mappings:1.19.2+build.intermediary-test.1:intermediary-v2")
it.parchment("org.parchmentmc.data:parchment-1.19.2:${parchment_mappings}@zip")
it.officialMojangMappings {
setNameSyntheticMembers(false)
}
})
/*mappings(loom.layered {
addLayer(quiltMappings.mappings("org.quiltmc:quilt-mappings:${minecraft_version}+build.${quilt_mappings}:v2"))
//mappings "net.fabricmc:yarn:1.19.2+build.4:v2"
officialMojangMappings()
})*/
modImplementation "net.fabricmc:fabric-loader:${loader_version}"
// Fabric API. This is technically optional, but you probably want it anyway.
modImplementation "net.fabricmc.fabric-api:fabric-api:${fabric_version}"
// FrozenLib
println "Using local FrozenLib: ${local_frozenlib}"
if (local_frozenlib) {
implementation(project(path: ":FrozenLib", configuration: 'dev'))
include(project(path: ":FrozenLib", configuration: 'dev'))
} else {
modImplementation "maven.modrinth:frozenlib:${frozenlib_version}"
include "maven.modrinth:frozenlib:${frozenlib_version}"
}
// Fabric-ASM
modImplementation "com.github.Chocohead:Fabric-ASM:${fabric_asm_version}"
include "com.github.Chocohead:Fabric-ASM:${fabric_asm_version}"
// Lunade
modImplementation "maven.modrinth:simple-copper-pipes:${copperpipes_version}"
// Mod Menu
modImplementation "com.terraformersmc:modmenu:${modmenu_version}"
// Cloth Config
modImplementation("me.shedaniel.cloth:cloth-config-fabric:${cloth_config_version}") {
exclude(group: "net.fabricmc.fabric-api")
exclude(group: "com.terraformersmc")
}
// NBT Crafting
modImplementation "maven.modrinth:nbt-crafting:${nbtcrafting_version}"
include "maven.modrinth:nbt-crafting:${nbtcrafting_version}"
// TerraBlender
modCompileOnly "com.github.glitchfiend:TerraBlender-fabric:${minecraft_version}-${terrablender_version}"
// Mixin Extras
includeImplementation("com.github.LlamaLad7:MixinExtras:0.0.12")
annotationProcessor("com.github.LlamaLad7:MixinExtras:0.0.12")
// Sodium
modCompileOnly "maven.modrinth:sodium:${sodium_version}"
modCompileOnly "org.joml:joml:1.10.4"
modCompileOnly "org.anarres:jcpp:1.4.14"
// only affects runClient, does not affect gradlew build. add -PuseThirdPartyMods=false to not use these
if (findProperty("useThirdPartyMods") != "false") {
modRuntimeOnly "maven.modrinth:ferrite-core:${ferritecore_version}"
modRuntimeOnly "maven.modrinth:lazydfu:${lazydfu_version}"
modRuntimeOnly "maven.modrinth:starlight:${starlight_version}"
modRuntimeOnly "maven.modrinth:lithium:mc1.19.2-0.8.3"
modRuntimeOnly "maven.modrinth:fastanim:${fastanim_version}"
// Sodium Related
/*modRuntimeOnly "maven.modrinth:iris:${iris_version}"
modRuntimeOnly "maven.modrinth:indium:${indium_version}"
modRuntimeOnly("me.flashyreese.mods:reeses-sodium-options:${reeses_sodium_options_version}") {
exclude group: "net.coderbot.iris_mc1_19", module: "iris"
}
modRuntimeOnly "me.flashyreese.mods:sodium-extra-fabric:${sodium_extra_version}"
modRuntimeOnly 'io.github.douira:glsl-transformer:0.27.0'
modRuntimeOnly "net.caffeinemc:mixin-config:1.0.0+1.17"*/
modRuntimeOnly "maven.modrinth:entityculling:${entityculling_version}"
//modRuntimeOnly "maven.modrinth:c2me-fabric:0.2.0+alpha.8.32+1.19.1-rc3"
modRuntimeOnly "maven.modrinth:ksyxis:${ksyxis_version}"
//modRuntimeOnly "maven.modrinth:iris:1.19.x-v1.2.5"
modRuntimeOnly "maven.modrinth:memoryleakfix:${memoryleakfix_version}"
modRuntimeOnly "maven.modrinth:no-unused-chunks:${no_unused_chunks_version}"
}
}
processResources {
inputs.property "version", project.version
filesMatching("fabric.mod.json") {
expand "version": project.version
}
}
javadoc {
options.tags = ["reason"]
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
tasks.withType(JavaCompile).configureEach {
it.options.encoding = "UTF-8"
// Minecraft 1.18 (1.18-pre2) upwards uses Java 17.
it.options.release = 17
options.fork = true
options.incremental = true
}
tasks.withType(Test).configureEach {
maxParallelForks = Runtime.runtime.availableProcessors().intdiv(2) ?: 1
}
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
// 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 {
from("LICENSE") {
rename { "${it}_${project.archivesBaseName}"}
}
}
artifacts {
archives sourcesJar
archives javadocJar
}
String getVersion() {
String version = "${mod_version}-${mod_loader}+${minecraft_version}"
if (findProperty("releaseType") != "stable") {
version += "-unstable"
}
return version
}
// 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.
}
}