2022-07-12 16:33:57 +00:00
|
|
|
val paperVersion = "1.19-R0.1-SNAPSHOT"
|
2022-02-27 22:38:55 +00:00
|
|
|
val viaVersion = "4.0.0"
|
2022-07-13 16:20:42 +00:00
|
|
|
val adaptersVersion = "1.5-SNAPSHOT"
|
2022-08-24 04:53:13 +00:00
|
|
|
val commodoreVersion = "2.2"
|
2022-02-27 22:38:55 +00:00
|
|
|
|
|
|
|
dependencies {
|
|
|
|
api(projects.core)
|
|
|
|
|
|
|
|
implementation("org.geysermc.geyser.adapters", "spigot-all", adaptersVersion)
|
2022-04-07 23:22:46 +00:00
|
|
|
|
|
|
|
implementation("me.lucko", "commodore", commodoreVersion)
|
2022-08-24 04:53:13 +00:00
|
|
|
|
|
|
|
implementation("net.kyori", "adventure-text-serializer-bungeecord", Versions.adventurePlatformVersion)
|
2022-07-12 17:09:48 +00:00
|
|
|
|
|
|
|
// Both paper-api and paper-mojangapi only provide Java 17 versions for 1.19
|
|
|
|
compileOnly("io.papermc.paper", "paper-api", paperVersion) {
|
|
|
|
attributes {
|
|
|
|
attribute(TargetJvmVersion.TARGET_JVM_VERSION_ATTRIBUTE, 17)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
compileOnly("io.papermc.paper", "paper-mojangapi", paperVersion) {
|
|
|
|
attributes {
|
|
|
|
attribute(TargetJvmVersion.TARGET_JVM_VERSION_ATTRIBUTE, 17)
|
|
|
|
}
|
|
|
|
}
|
2022-02-27 22:38:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
platformRelocate("it.unimi.dsi.fastutil")
|
|
|
|
platformRelocate("com.fasterxml.jackson")
|
|
|
|
platformRelocate("net.kyori")
|
|
|
|
platformRelocate("org.objectweb.asm")
|
2022-04-07 23:22:46 +00:00
|
|
|
platformRelocate("me.lucko.commodore")
|
2022-06-08 12:09:14 +00:00
|
|
|
platformRelocate("io.netty.channel.kqueue")
|
2022-02-27 22:38:55 +00:00
|
|
|
|
|
|
|
// These dependencies are already present on the platform
|
|
|
|
provided("com.viaversion", "viaversion", viaVersion)
|
|
|
|
|
|
|
|
application {
|
|
|
|
mainClass.set("org.geysermc.geyser.platform.spigot.GeyserSpigotMain")
|
|
|
|
}
|
|
|
|
|
|
|
|
tasks.withType<com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar> {
|
|
|
|
archiveBaseName.set("Geyser-Spigot")
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
exclude(dependency("com.google.*:.*"))
|
|
|
|
exclude(dependency("org.yaml:.*"))
|
|
|
|
|
|
|
|
// 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:netty-transport-native-epoll:.*"))
|
|
|
|
exclude(dependency("io.netty:netty-transport-native-unix-common:.*"))
|
|
|
|
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-07 23:22:46 +00:00
|
|
|
|
|
|
|
// Commodore includes Brigadier
|
|
|
|
exclude(dependency("com.mojang:.*"))
|
2022-08-24 04:53:13 +00:00
|
|
|
|
|
|
|
// Adventure slf4j
|
|
|
|
exclude(dependency("net.kyori.adventure.text.logger.slf4j:ComponentLogger"))
|
2022-02-27 22:38:55 +00:00
|
|
|
}
|
|
|
|
}
|