3
0
Mirror von https://github.com/GeyserMC/Geyser.git synchronisiert 2024-12-26 16:12:46 +01:00
Geyser/bootstrap/spigot/build.gradle.kts

84 Zeilen
2.9 KiB
Plaintext

2022-02-27 23:38:55 +01:00
dependencies {
api(projects.core)
api(libs.erosion.bukkit.common) {
isTransitive = false
}
2022-02-27 23:38:55 +01:00
2024-05-15 21:31:02 +02:00
implementation(libs.erosion.bukkit.nms) {
attributes {
attribute(TargetJvmVersion.TARGET_JVM_VERSION_ATTRIBUTE, 21)
}
}
2023-06-28 06:31:03 +02:00
implementation(variantOf(libs.adapters.spigot) {
classifier("all") // otherwise the unshaded jar is used without the shaded NMS implementations
})
2024-04-30 20:48:10 +02:00
implementation(variantOf(libs.adapters.paper) {
classifier("all") // otherwise the unshaded jar is used without the shaded NMS implementations
})
implementation(libs.commodore)
2022-08-24 06:53:13 +02:00
implementation(libs.adventure.text.serializer.bungeecord)
compileOnly(libs.folia.api)
compileOnly(libs.paper.mojangapi)
compileOnlyApi(libs.viaversion)
2022-02-27 23:38:55 +01:00
}
platformRelocate("it.unimi.dsi.fastutil")
platformRelocate("com.fasterxml.jackson")
2022-08-24 15:41:24 +02:00
// Relocate net.kyori but exclude the component logger
2022-08-24 07:18:12 +02:00
platformRelocate("net.kyori", "net.kyori.adventure.text.logger.slf4j.ComponentLogger")
2022-02-27 23:38:55 +01:00
platformRelocate("org.objectweb.asm")
platformRelocate("me.lucko.commodore")
platformRelocate("org.yaml") // Broken as of 1.20
2022-02-27 23:38:55 +01:00
// These dependencies are already present on the platform
2022-10-03 22:11:07 +02:00
provided(libs.viaversion)
2022-02-27 23:38:55 +01:00
application {
mainClass.set("org.geysermc.geyser.platform.spigot.GeyserSpigotMain")
}
tasks.withType<com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar> {
2024-04-30 20:48:10 +02:00
// Prevents Paper 1.20.5+ from remapping Geyser
manifest {
attributes["paperweight-mappings-namespace"] = "mojang"
}
2022-02-27 23:38:55 +01:00
archiveBaseName.set("Geyser-Spigot")
dependencies {
exclude(dependency("com.google.*:.*"))
// We cannot shade Netty, or else native libraries will not load
// Needed because older Spigot builds do not provide the haproxy module
exclude(dependency("io.netty.incubator:.*"))
2023-03-22 16:10:04 +01:00
exclude(dependency("io.netty:netty-transport-classes-epoll:.*"))
2022-02-27 23:38:55 +01:00
exclude(dependency("io.netty:netty-transport-native-epoll:.*"))
exclude(dependency("io.netty:netty-transport-native-unix-common:.*"))
exclude(dependency("io.netty:netty-transport-classes-kqueue:.*"))
2022-02-27 23:38:55 +01:00
exclude(dependency("io.netty:netty-transport-native-kqueue:.*"))
exclude(dependency("io.netty:netty-handler:.*"))
exclude(dependency("io.netty:netty-common:.*"))
exclude(dependency("io.netty:netty-buffer:.*"))
exclude(dependency("io.netty:netty-resolver:.*"))
exclude(dependency("io.netty:netty-transport:.*"))
exclude(dependency("io.netty:netty-codec:.*"))
exclude(dependency("io.netty:netty-codec-dns:.*"))
exclude(dependency("io.netty:netty-resolver-dns:.*"))
exclude(dependency("io.netty:netty-resolver-dns-native-macos:.*"))
// Commodore includes Brigadier
exclude(dependency("com.mojang:.*"))
2022-02-27 23:38:55 +01:00
}
}
modrinth {
uploadFile.set(tasks.getByPath("shadowJar"))
loaders.addAll("spigot", "paper")
}