This repository has been archived by the owner on Mar 15, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle.kts
85 lines (71 loc) · 2.36 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
plugins {
id("java-library")
id("net.labymod.gradle")
id("net.labymod.gradle.addon")
}
group = "com.rettichlp.unicacityaddon"
version = "2.5.0"
java.toolchain.languageVersion.set(JavaLanguageVersion.of(17))
labyMod {
defaultPackageName = "com.rettichlp.unicacityaddon" //change this to your main package name (used by all modules)
addonInfo {
namespace = "unicacityaddon"
displayName = "UnicacityAddon"
author = "RettichLP & Dimiikou"
description = "UnicacityAddon is a LabyMod addon written for the Minecraft server Unicacity and provides specialized, nice-to-have features and utilities for everyday gameplay."
minecraftVersion = "1.12.2"
version = System.getenv().getOrDefault("VERSION", "2.5.0")
}
minecraft {
registerVersions(
"1.12.2"
) { 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.Java17LabyModLaunchWrapperTweaker")
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
}
}