-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
74 lines (65 loc) · 1.67 KB
/
build.gradle.kts
File metadata and controls
74 lines (65 loc) · 1.67 KB
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
plugins {
id("fabric-loom") version "1.14-SNAPSHOT"
}
version = project.properties["mod_version"] as String
group = project.properties["maven_group"] as String
base {
archivesName = project.properties["archives_base_name"] as String
}
repositories {
maven("https://maven.parchmentmc.org") {
content {
includeGroup("org.parchmentmc.data")
}
}
maven("https://api.modrinth.com/maven") {
name = "Modrinth"
}
}
loom {
accessWidenerPath = file("src/main/resources/zenithproxy.accesswidener")
runs {
getByName("client") {
client()
}
}
}
dependencies {
// To change the versions see the gradle.properties file
minecraft("com.mojang:minecraft:${project.properties["minecraft_version"]}")
mappings(loom.layered {
officialMojangMappings()
parchment("org.parchmentmc.data:parchment-1.21.1:2024.11.17@zip")
})
modImplementation("net.fabricmc:fabric-loader:${project.properties["loader_version"]}")
modImplementation("net.fabricmc.fabric-api:fabric-api:${project.properties["fabric_version"]}")
modRuntimeOnly("maven.modrinth:modmenu:11.0.3")
}
tasks {
processResources {
inputs.property("version", version)
filesMatching("fabric.mod.json") {
expand("version" to version)
}
}
withType(JavaCompile::class.java).configureEach {
options.release = 21
}
jar {
from("LICENSE") {
rename { "${it}_${project.base.archivesName.get()}" }
}
}
remapJar {
archiveVersion = "${project.properties["mod_version"]}+fabric-${project.properties["minecraft_version"]}"
}
register("printVersion") {
doLast {
println("${project.properties["mod_version"]}")
}
}
}
java {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}