2023-01-01 23:53:37 +01:00
|
|
|
import com.github.jengelman.gradle.plugins.shadow.transformers.Log4j2PluginsCacheFileTransformer
|
|
|
|
|
|
|
|
plugins {
|
|
|
|
application
|
2023-03-27 00:00:24 +02:00
|
|
|
id("velocity-init-manifest")
|
2023-03-26 14:53:11 +02:00
|
|
|
alias(libs.plugins.shadow)
|
2023-01-01 23:53:37 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
application {
|
|
|
|
mainClass.set("com.velocitypowered.proxy.Velocity")
|
2024-04-24 10:39:22 +02:00
|
|
|
applicationDefaultJvmArgs += listOf("-Dvelocity.packet-decode-logging=true");
|
2023-01-01 23:53:37 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
tasks {
|
|
|
|
withType<Checkstyle> {
|
|
|
|
exclude("**/com/velocitypowered/proxy/protocol/packet/**")
|
|
|
|
}
|
|
|
|
|
|
|
|
jar {
|
|
|
|
manifest {
|
|
|
|
attributes["Implementation-Title"] = "Velocity"
|
|
|
|
attributes["Implementation-Vendor"] = "Velocity Contributors"
|
|
|
|
attributes["Multi-Release"] = "true"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
shadowJar {
|
|
|
|
transform(Log4j2PluginsCacheFileTransformer::class.java)
|
|
|
|
|
|
|
|
// Exclude all the collection types we don"t intend to use
|
|
|
|
exclude("it/unimi/dsi/fastutil/booleans/**")
|
|
|
|
exclude("it/unimi/dsi/fastutil/bytes/**")
|
|
|
|
exclude("it/unimi/dsi/fastutil/chars/**")
|
|
|
|
exclude("it/unimi/dsi/fastutil/doubles/**")
|
|
|
|
exclude("it/unimi/dsi/fastutil/floats/**")
|
|
|
|
exclude("it/unimi/dsi/fastutil/longs/**")
|
|
|
|
exclude("it/unimi/dsi/fastutil/shorts/**")
|
|
|
|
|
|
|
|
// Exclude the fastutil IO utilities - we don"t use them.
|
|
|
|
exclude("it/unimi/dsi/fastutil/io/**")
|
|
|
|
|
|
|
|
// Exclude most of the int types - Object2IntMap have a values() method that returns an
|
|
|
|
// IntCollection, and we need Int2ObjectMap
|
|
|
|
exclude("it/unimi/dsi/fastutil/ints/*Int2Boolean*")
|
|
|
|
exclude("it/unimi/dsi/fastutil/ints/*Int2Byte*")
|
|
|
|
exclude("it/unimi/dsi/fastutil/ints/*Int2Char*")
|
|
|
|
exclude("it/unimi/dsi/fastutil/ints/*Int2Double*")
|
|
|
|
exclude("it/unimi/dsi/fastutil/ints/*Int2Float*")
|
|
|
|
exclude("it/unimi/dsi/fastutil/ints/*Int2Int*")
|
|
|
|
exclude("it/unimi/dsi/fastutil/ints/*Int2Long*")
|
|
|
|
exclude("it/unimi/dsi/fastutil/ints/*Int2Short*")
|
|
|
|
exclude("it/unimi/dsi/fastutil/ints/*Int2Reference*")
|
|
|
|
exclude("it/unimi/dsi/fastutil/ints/IntAVL*")
|
|
|
|
exclude("it/unimi/dsi/fastutil/ints/IntArray*")
|
|
|
|
exclude("it/unimi/dsi/fastutil/ints/*IntBi*")
|
|
|
|
exclude("it/unimi/dsi/fastutil/ints/Int*Pair")
|
|
|
|
exclude("it/unimi/dsi/fastutil/ints/IntLinked*")
|
|
|
|
exclude("it/unimi/dsi/fastutil/ints/IntList*")
|
|
|
|
exclude("it/unimi/dsi/fastutil/ints/IntHeap*")
|
|
|
|
exclude("it/unimi/dsi/fastutil/ints/IntOpen*")
|
|
|
|
exclude("it/unimi/dsi/fastutil/ints/IntRB*")
|
|
|
|
exclude("it/unimi/dsi/fastutil/ints/IntSorted*")
|
|
|
|
exclude("it/unimi/dsi/fastutil/ints/*Priority*")
|
|
|
|
exclude("it/unimi/dsi/fastutil/ints/*BigList*")
|
|
|
|
|
|
|
|
// Try to exclude everything BUT Object2Int{LinkedOpen,Open,CustomOpen}HashMap
|
|
|
|
exclude("it/unimi/dsi/fastutil/objects/*ObjectArray*")
|
|
|
|
exclude("it/unimi/dsi/fastutil/objects/*ObjectAVL*")
|
|
|
|
exclude("it/unimi/dsi/fastutil/objects/*Object*Big*")
|
|
|
|
exclude("it/unimi/dsi/fastutil/objects/*Object2Boolean*")
|
|
|
|
exclude("it/unimi/dsi/fastutil/objects/*Object2Byte*")
|
|
|
|
exclude("it/unimi/dsi/fastutil/objects/*Object2Char*")
|
|
|
|
exclude("it/unimi/dsi/fastutil/objects/*Object2Double*")
|
|
|
|
exclude("it/unimi/dsi/fastutil/objects/*Object2Float*")
|
|
|
|
exclude("it/unimi/dsi/fastutil/objects/*Object2IntArray*")
|
|
|
|
exclude("it/unimi/dsi/fastutil/objects/*Object2IntAVL*")
|
|
|
|
exclude("it/unimi/dsi/fastutil/objects/*Object2IntRB*")
|
|
|
|
exclude("it/unimi/dsi/fastutil/objects/*Object2Long*")
|
|
|
|
exclude("it/unimi/dsi/fastutil/objects/*Object2Object*")
|
|
|
|
exclude("it/unimi/dsi/fastutil/objects/*Object2Reference*")
|
|
|
|
exclude("it/unimi/dsi/fastutil/objects/*Object2Short*")
|
|
|
|
exclude("it/unimi/dsi/fastutil/objects/*ObjectRB*")
|
|
|
|
exclude("it/unimi/dsi/fastutil/objects/*Reference*")
|
|
|
|
|
|
|
|
// Exclude Checker Framework annotations
|
|
|
|
exclude("org/checkerframework/checker/**")
|
|
|
|
|
|
|
|
relocate("org.bstats", "com.velocitypowered.proxy.bstats")
|
2023-12-11 16:16:44 +01:00
|
|
|
|
|
|
|
// Include Configurate 3
|
|
|
|
val configurateBuildTask = project(":deprecated-configurate3").tasks.named("shadowJar")
|
|
|
|
dependsOn(configurateBuildTask)
|
|
|
|
from(zipTree(configurateBuildTask.map { it.outputs.files.singleFile }))
|
2023-01-01 23:53:37 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
implementation(project(":velocity-api"))
|
|
|
|
implementation(project(":velocity-native"))
|
2024-01-04 16:40:11 +01:00
|
|
|
implementation(project(":velocity-proxy-log4j2-plugin"))
|
2023-01-01 23:53:37 +01:00
|
|
|
|
2023-03-26 14:53:11 +02:00
|
|
|
implementation(libs.bundles.log4j)
|
2023-10-12 19:44:10 +02:00
|
|
|
implementation(libs.kyori.ansi)
|
2023-03-26 14:53:11 +02:00
|
|
|
implementation(libs.netty.codec)
|
|
|
|
implementation(libs.netty.codec.haproxy)
|
|
|
|
implementation(libs.netty.codec.http)
|
|
|
|
implementation(libs.netty.handler)
|
|
|
|
implementation(libs.netty.transport.native.epoll)
|
|
|
|
implementation(variantOf(libs.netty.transport.native.epoll) { classifier("linux-x86_64") })
|
|
|
|
implementation(variantOf(libs.netty.transport.native.epoll) { classifier("linux-aarch_64") })
|
2023-10-27 23:32:22 +02:00
|
|
|
implementation(libs.netty.transport.native.kqueue)
|
|
|
|
implementation(variantOf(libs.netty.transport.native.kqueue) { classifier("osx-x86_64") })
|
|
|
|
implementation(variantOf(libs.netty.transport.native.kqueue) { classifier("osx-aarch_64") })
|
2023-03-26 14:53:11 +02:00
|
|
|
|
|
|
|
implementation(libs.jopt)
|
|
|
|
implementation(libs.terminalconsoleappender)
|
|
|
|
runtimeOnly(libs.jline)
|
|
|
|
runtimeOnly(libs.disruptor)
|
|
|
|
implementation(libs.fastutil)
|
2023-03-26 16:18:28 +02:00
|
|
|
implementation(platform(libs.adventure.bom))
|
2023-01-01 23:53:37 +01:00
|
|
|
implementation("net.kyori:adventure-nbt")
|
2023-03-26 14:53:11 +02:00
|
|
|
implementation(libs.adventure.facet)
|
|
|
|
implementation(libs.completablefutures)
|
|
|
|
implementation(libs.nightconfig)
|
|
|
|
implementation(libs.bstats)
|
|
|
|
implementation(libs.lmbda)
|
2023-06-03 04:12:03 +02:00
|
|
|
implementation(libs.asm)
|
2023-03-26 14:53:11 +02:00
|
|
|
implementation(libs.bundles.flare)
|
|
|
|
compileOnly(libs.spotbugs.annotations)
|
2024-01-20 22:58:00 +01:00
|
|
|
compileOnly(libs.auto.service.annotations)
|
2023-03-26 14:53:11 +02:00
|
|
|
testImplementation(libs.mockito)
|
2024-01-20 22:58:00 +01:00
|
|
|
|
|
|
|
annotationProcessor(libs.auto.service)
|
2023-01-01 23:53:37 +01:00
|
|
|
}
|