Mirror von
https://github.com/PaperMC/Velocity.git
synchronisiert 2024-11-17 05:20:14 +01:00
5448f54380
leaving some debug in as I'm still working on this, TODO: some registries are now 1:1 with what is sended, however, there is some restructing here as the code doesn't reflect some caveats of how this information is populated, i.e. fields which where said to not be nullable are actually in fact nullable, AND, this matters, at least if we wanna ensure that what we send is what we got Needs some moving stuff around to factor the above in, overlay section needs dealing with currently breaks chatting, chances are the registry repopulation is bork somewhere
163 Zeilen
6.5 KiB
Groovy
163 Zeilen
6.5 KiB
Groovy
import com.github.jengelman.gradle.plugins.shadow.transformers.Log4j2PluginsCacheFileTransformer
|
|
|
|
plugins {
|
|
id 'java'
|
|
//id 'checkstyle' // This is bork
|
|
}
|
|
|
|
apply plugin: 'org.cadixdev.licenser'
|
|
//apply from: '../gradle/checkstyle.gradle' // This is bork
|
|
apply plugin: 'com.github.johnrengelman.shadow'
|
|
|
|
license {
|
|
header = project.rootProject.file('HEADER.txt')
|
|
}
|
|
|
|
jar {
|
|
manifest {
|
|
def buildNumber = System.getenv("BUILD_NUMBER") ?: "unknown"
|
|
def version
|
|
if (project.version.endsWith("-SNAPSHOT")) {
|
|
version = "${project.version} (git-${project.ext.getCurrentShortRevision()}-b${buildNumber})"
|
|
} else {
|
|
version = "${project.version}"
|
|
}
|
|
|
|
attributes 'Main-Class': 'com.velocitypowered.proxy.Velocity'
|
|
attributes 'Implementation-Title': "Velocity"
|
|
attributes 'Implementation-Version': version
|
|
attributes 'Implementation-Vendor': "Velocity Contributors"
|
|
attributes 'Multi-Release': 'true'
|
|
}
|
|
}
|
|
|
|
shadowJar {
|
|
transform(Log4j2PluginsCacheFileTransformer)
|
|
}
|
|
|
|
tasks.withType(Checkstyle) {
|
|
exclude('**/com/velocitypowered/proxy/protocol/packet/*.java')
|
|
}
|
|
|
|
dependencies {
|
|
// Note: we depend on the API twice, first the main sourceset, and then the annotation processor.
|
|
implementation project(':velocity-api')
|
|
implementation project(':velocity-api').sourceSets.ap.output
|
|
implementation project(':velocity-native')
|
|
|
|
implementation "io.netty:netty-codec:${nettyVersion}"
|
|
implementation "io.netty:netty-codec-haproxy:${nettyVersion}"
|
|
implementation "io.netty:netty-codec-http:${nettyVersion}"
|
|
implementation "io.netty:netty-handler:${nettyVersion}"
|
|
implementation "io.netty:netty-transport-native-epoll:${nettyVersion}"
|
|
implementation "io.netty:netty-transport-native-epoll:${nettyVersion}:linux-x86_64"
|
|
implementation "io.netty:netty-transport-native-epoll:${nettyVersion}:linux-aarch_64"
|
|
|
|
implementation "org.apache.logging.log4j:log4j-api:${log4jVersion}"
|
|
implementation "org.apache.logging.log4j:log4j-core:${log4jVersion}"
|
|
implementation "org.apache.logging.log4j:log4j-slf4j-impl:${log4jVersion}"
|
|
implementation "org.apache.logging.log4j:log4j-iostreams:${log4jVersion}"
|
|
implementation "org.apache.logging.log4j:log4j-jul:${log4jVersion}"
|
|
|
|
implementation 'net.sf.jopt-simple:jopt-simple:5.0.4' // command-line options
|
|
implementation 'net.minecrell:terminalconsoleappender:1.2.0'
|
|
runtimeOnly 'org.jline:jline-terminal-jansi:3.20.0' // Needed for JLine
|
|
runtimeOnly 'com.lmax:disruptor:3.4.4' // Async loggers
|
|
|
|
implementation 'it.unimi.dsi:fastutil-core:8.5.4'
|
|
|
|
implementation(platform("net.kyori:adventure-bom:${adventureVersion}"))
|
|
implementation("net.kyori:adventure-nbt")
|
|
implementation("net.kyori:adventure-platform-facet:4.0.0")
|
|
|
|
implementation 'org.asynchttpclient:async-http-client:2.12.3'
|
|
|
|
implementation 'com.spotify:completable-futures:0.3.5'
|
|
|
|
implementation 'com.electronwill.night-config:toml:3.6.4'
|
|
|
|
implementation 'org.bstats:bstats-base:2.2.1'
|
|
implementation 'org.lanternpowered:lmbda:2.0.0'
|
|
|
|
implementation 'com.github.ben-manes.caffeine:caffeine:3.0.3'
|
|
|
|
implementation 'space.vectrix.flare:flare:2.0.0'
|
|
implementation 'space.vectrix.flare:flare-fastutil:2.0.0'
|
|
|
|
compileOnly 'com.github.spotbugs:spotbugs-annotations:4.4.0'
|
|
|
|
testImplementation "org.junit.jupiter:junit-jupiter-api:${junitVersion}"
|
|
testImplementation "org.junit.jupiter:junit-jupiter-engine:${junitVersion}"
|
|
testImplementation "org.mockito:mockito-core:3.+"
|
|
}
|
|
|
|
test {
|
|
useJUnitPlatform()
|
|
}
|
|
|
|
shadowJar {
|
|
// 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'
|
|
}
|
|
|
|
artifacts {
|
|
archives shadowJar
|
|
}
|