-
Notifications
You must be signed in to change notification settings - Fork 37
/
Copy pathcommon.gradle
78 lines (63 loc) · 2.23 KB
/
common.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
import groovy.json.JsonBuilder
import groovy.json.JsonSlurper
apply plugin: "fabric-loom"
apply plugin: "com.replaymod.preprocess"
int mcVersion = 1
preprocess {
mcVersion = vars.get().get("MC")
tabIndentation = true
}
java {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}
version = mod_version
group = maven_group
base {
archivesName = "${archives_base_name}-${minecraft_version}"
}
dependencies {
minecraft("com.mojang:minecraft:${minecraft_version}")
mappings(loom.officialMojangMappings())
modImplementation("net.fabricmc:fabric-loader:${loader_version}")
modApi("net.fabricmc.fabric-api:fabric-api:${fabric_version}")
modImplementation("net.dv8tion:JDA:5.1.0") {
exclude module: "opus-java"
}
modImplementation("net.sf.trove4j:core:3.1.0")
modImplementation("org.apache.commons:commons-collections4:4.4")
modImplementation("org.slf4j:slf4j-api:2.0.13") // 1.x is Incompatible with Quilt (#164)
modImplementation("com.neovisionaries:nv-websocket-client:2.14")
modImplementation("com.fasterxml.jackson.core:jackson-core:2.17.2")
modImplementation("com.fasterxml.jackson.core:jackson-databind:2.17.2")
modImplementation("com.fasterxml.jackson.core:jackson-annotations:2.17.2")
modImplementation("com.squareup.okhttp3:okhttp:4.12.0")
modImplementation("com.squareup.okio:okio-jvm:3.6.0")
modImplementation("org.jetbrains.kotlin:kotlin-stdlib:1.8.21")
modImplementation("net.fellbaum:jemoji:1.3.4") // File size of 1.4.x is too big
modImplementation("com.google.code.gson:gson:2.11.0")
}
processResources {
filesMatching("fabric.mod.json") {
def valueMap = [
"mc_version": minecraft_version.replace(".", "_"),
"version" : mod_version
]
expand valueMap
}
doLast {
ArrayList<?> minecraft_dependency = minecraft_dependency.split(",")
File file = file("build/resources/main/fabric.mod.json")
JsonSlurper slurper = new JsonSlurper()
JsonBuilder builder = new JsonBuilder(slurper.parse(file))
builder.content.depends.minecraft = minecraft_dependency
BufferedWriter writer = file.newWriter()
writer.append(builder.toPrettyString())
writer.flush()
writer.close()
}
}
tasks.withType(JavaCompile).configureEach {
it.options.encoding = "UTF-8"
it.options.release = 21
}