2022-02-27 23:38:55 +01:00
|
|
|
dependencies {
|
|
|
|
api(projects.core)
|
2023-03-30 21:44:55 +02:00
|
|
|
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
|
|
|
|
})
|
2022-04-08 01:22:46 +02:00
|
|
|
|
2024-07-12 06:56:42 +02:00
|
|
|
implementation(libs.cloud.paper)
|
2022-09-26 17:43:17 +02:00
|
|
|
implementation(libs.commodore)
|
2022-08-24 06:53:13 +02:00
|
|
|
|
2022-09-26 17:43:17 +02:00
|
|
|
implementation(libs.adventure.text.serializer.bungeecord)
|
2024-03-19 23:05:30 +01:00
|
|
|
|
|
|
|
compileOnly(libs.folia.api)
|
|
|
|
|
|
|
|
compileOnlyApi(libs.viaversion)
|
2024-06-26 18:49:42 +02:00
|
|
|
|
2024-06-27 03:49:26 +02:00
|
|
|
// For 1.16.5/1.17.1
|
|
|
|
implementation(libs.gson.record.factory) {
|
|
|
|
isTransitive = false
|
|
|
|
}
|
2022-02-27 23:38:55 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
platformRelocate("it.unimi.dsi.fastutil")
|
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")
|
2022-04-08 01:22:46 +02:00
|
|
|
platformRelocate("me.lucko.commodore")
|
2024-07-12 06:56:42 +02:00
|
|
|
platformRelocate("org.incendo")
|
|
|
|
platformRelocate("io.leangen.geantyref") // provided by cloud, should also be relocated
|
2023-06-07 20:22:36 +02:00
|
|
|
platformRelocate("org.yaml") // Broken as of 1.20
|
2024-05-24 01:57:22 +02:00
|
|
|
platformRelocate("org.spongepowered")
|
|
|
|
platformRelocate("io.leangen.geantyref")
|
2024-06-26 18:49:42 +02:00
|
|
|
platformRelocate("marcono1234.gson")
|
2024-07-07 04:49:28 +02:00
|
|
|
platformRelocate("org.bstats")
|
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
|
|
|
|
2024-07-12 06:56:42 +02:00
|
|
|
tasks.withType<Jar> {
|
|
|
|
manifest.attributes["Main-Class"] = "org.geysermc.geyser.platform.spigot.GeyserSpigotMain"
|
2022-02-27 23:38:55 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
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
|
2024-04-19 11:50:40 +02:00
|
|
|
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:.*"))
|
2023-04-07 01:54:22 +02:00
|
|
|
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:.*"))
|
2022-04-08 01:22:46 +02:00
|
|
|
|
|
|
|
// Commodore includes Brigadier
|
|
|
|
exclude(dependency("com.mojang:.*"))
|
2022-02-27 23:38:55 +01:00
|
|
|
}
|
2023-06-07 20:22:36 +02:00
|
|
|
}
|
2024-06-17 21:31:54 +02:00
|
|
|
|
|
|
|
modrinth {
|
|
|
|
uploadFile.set(tasks.getByPath("shadowJar"))
|
2024-08-09 02:15:08 +02:00
|
|
|
gameVersions.addAll("1.16.5", "1.17", "1.17.1", "1.18", "1.18.1", "1.18.2", "1.19",
|
|
|
|
"1.19.1", "1.19.2", "1.19.3", "1.19.4", "1.20", "1.20.1", "1.20.2", "1.20.3", "1.20.4", "1.20.5", "1.20.6")
|
2024-06-17 21:31:54 +02:00
|
|
|
loaders.addAll("spigot", "paper")
|
|
|
|
}
|