-
Notifications
You must be signed in to change notification settings - Fork 5
/
build.gradle.kts
103 lines (82 loc) · 3.26 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
96
97
98
99
100
101
102
103
plugins {
antihealthindicator.`java-conventions`
alias(libs.plugins.shadow)
alias(libs.plugins.run.paper)
alias(libs.plugins.run.velocity)
}
group = "com.deathmotion.antihealthindicator"
description = "A plugin that prevents hackers and modders from seeing the health of other players."
version = "2.3.1-SNAPSHOT"
dependencies {
implementation(project(":common"))
implementation(project(":platforms:bukkit"))
implementation(project(":platforms:velocity"))
implementation(project(":platforms:bungeecord"))
implementation(project(":platforms:sponge"))
}
tasks {
jar {
enabled = false
}
shadowJar {
archiveFileName = "${rootProject.name}-${project.version}.jar"
archiveClassifier = null
relocate("net.kyori.adventure.text.serializer.gson", "io.github.retrooper.packetevents.adventure.serializer.gson")
relocate("net.kyori.adventure.text.serializer.legacy", "io.github.retrooper.packetevents.adventure.serializer.legacy")
manifest {
attributes["Implementation-Version"] = rootProject.version
}
}
assemble {
dependsOn(shadowJar)
}
// 1.8.8 - 1.16.5 = Java 8
// 1.17 = Java 16
// 1.18 - 1.20.4 = Java 17
// 1-20.5+ = Java 21
val version = "1.21.3"
val javaVersion = JavaLanguageVersion.of(21)
val jvmArgsExternal = listOf(
"-Dcom.mojang.eula.agree=true"
)
val sharedBukkitPlugins = runPaper.downloadPluginsSpec {
url("https://ci.codemc.io/job/retrooper/job/packetevents/lastSuccessfulBuild/artifact/spigot/build/libs/packetevents-spigot-2.6.1-SNAPSHOT.jar")
url("https://github.com/ViaVersion/ViaVersion/releases/download/5.1.1/ViaVersion-5.1.1.jar")
url("https://github.com/ViaVersion/ViaBackwards/releases/download/5.1.1/ViaBackwards-5.1.1.jar")
}
runServer {
minecraftVersion(version)
runDirectory = rootDir.resolve("run/paper/$version")
javaLauncher = project.javaToolchains.launcherFor {
languageVersion = javaVersion
}
downloadPlugins {
from(sharedBukkitPlugins)
url("https://ci.lucko.me/job/spark/462/artifact/spark-bukkit/build/libs/spark-1.10.116-bukkit.jar")
url("https://download.luckperms.net/1560/bukkit/loader/LuckPerms-Bukkit-5.4.145.jar")
}
jvmArgs = jvmArgsExternal
}
runPaper.folia.registerTask {
minecraftVersion(version)
runDirectory = rootDir.resolve("run/folia/$version")
javaLauncher = project.javaToolchains.launcherFor {
languageVersion = javaVersion
}
downloadPlugins {
from(sharedBukkitPlugins)
}
jvmArgs = jvmArgsExternal
}
runVelocity {
velocityVersion("3.3.0-SNAPSHOT")
runDirectory = rootDir.resolve("run/velocity/")
javaLauncher = project.javaToolchains.launcherFor {
languageVersion = javaVersion
}
downloadPlugins {
url("https://ci.codemc.io/job/retrooper/job/packetevents/lastSuccessfulBuild/artifact/velocity/build/libs/packetevents-velocity-2.6.1-SNAPSHOT.jar")
url("https://ci.lucko.me/job/spark/418/artifact/spark-velocity/build/libs/spark-1.10.73-velocity.jar")
}
}
}