-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
88 lines (74 loc) · 2.37 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
plugins {
id("java-library")
id("net.labymod.gradle")
id("net.labymod.gradle.addon")
}
java.toolchain.languageVersion.set(JavaLanguageVersion.of(17))
labyMod {
defaultPackageName = "de.felitendo.felotools" //change this to your main package name (used by all modules)
addonInfo {
namespace = "felotools"
displayName = "FeloTools"
author = "Felitendo"
description = "Easy to use, quality of life features packed into one Addon. '/fthelp' for more information."
minecraftVersion = "1.16.1<*"
version = System.getenv().getOrDefault("VERSION", "0.0.1")
}
minecraft {
registerVersions(
"1.8.9",
"1.12.2",
"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 = JavaVersion.VERSION_21
provider.mixin {
val mixinMinVersion = when (gameVersion) {
"1.8.9", "1.12.2", "1.16.5" -> {
"0.6.6"
}
else -> {
"0.8.2"
}
}
minVersion = mixinMinVersion
}
}