-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
95 lines (81 loc) · 2.45 KB
/
build.gradle.kts
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
plugins {
id("java-library")
id("net.labymod.gradle")
id("net.labymod.gradle.addon")
}
group = "de.northernside"
version = System.getenv().getOrDefault("VERSION", "1.1.0")
java.toolchain.languageVersion.set(JavaLanguageVersion.of(17))
labyMod {
defaultPackageName = "de.northernside"
addonInfo {
namespace = "uuidcollector"
displayName = "UUIDCollector"
author = "Northernside, Bisou, RealMuffinTime"
description = "Collects UUIDs on servers and sends them to an external endpoint."
minecraftVersion = "*"
version = getVersion().toString()
}
minecraft {
registerVersions(
"1.8.9",
"1.12.2",
"1.16.5",
"1.17.1",
"1.18.2",
"1.19.2",
"1.19.3",
"1.19.4",
"1.20.1",
"1.20.2",
"1.20.4"
) { version, provider ->
configureRun(provider, version)
}
subprojects.forEach {
if (it.name != "game-runner") {
filter(it.name)
}
}
}
addonDev {
productionRelease()
}
}
subprojects {
plugins.apply("java-library")
plugins.apply("net.labymod.gradle")
plugins.apply("net.labymod.gradle.addon")
repositories {
maven("https://libraries.minecraft.net/")
maven("https://repo.spongepowered.org/repository/maven-public/")
}
}
fun configureRun(provider: net.labymod.gradle.core.minecraft.provider.VersionProvider, gameVersion: String) {
provider.runConfiguration {
mainClass = "net.minecraft.launchwrapper.Launch"
jvmArgs("-Dnet.labymod.running-version=${gameVersion}")
jvmArgs("-Dmixin.debug=true")
jvmArgs("-Dnet.labymod.debugging.all=true")
jvmArgs("-Dmixin.env.disableRefMap=true")
args("--tweakClass", "net.labymod.core.loader.vanilla.launchwrapper.LabyModLaunchWrapperTweaker")
args("--labymod-dev-environment", "true")
args("--addon-dev-environment", "true")
}
provider.javaVersion = when (gameVersion) {
else -> {
JavaVersion.VERSION_17
}
}
provider.mixin {
val mixinMinVersion = when (gameVersion) {
"1.8.9", "1.12.2", "1.16.5" -> {
"0.6.6"
}
else -> {
"0.8.2"
}
}
minVersion = mixinMinVersion
}
}