mirror of
https://github.com/ViaVersion/VIAaaS.git
synced 2025-01-08 19:38:36 +01:00
separate dependencyUpdates, experimental netty io_uring
This commit is contained in:
parent
c91d0d481e
commit
9790661767
11
.github/workflows/dependencyUpdates.yml
vendored
Normal file
11
.github/workflows/dependencyUpdates.yml
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
name: Gradle dependencyUpdates
|
||||
on: [ push, pull_request ]
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 16
|
||||
- run: ./gradlew dependencyUpdates
|
2
.github/workflows/gradle.yml
vendored
2
.github/workflows/gradle.yml
vendored
@ -1,6 +1,6 @@
|
||||
# This workflow will build a Java project with Gradle
|
||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
|
||||
name: Java CI with Gradle
|
||||
name: Gradle build
|
||||
on: [ push, pull_request ]
|
||||
jobs:
|
||||
build:
|
||||
|
@ -16,7 +16,7 @@ plugins {
|
||||
id("com.github.johnrengelman.shadow") version "7.0.0"
|
||||
id("com.github.ben-manes.versions") version "0.39.0"
|
||||
id("com.palantir.git-version") version "0.12.3"
|
||||
id("org.gradlewebtools.minify") version "1.2.0" apply false
|
||||
id("org.gradlewebtools.minify") version "1.2.1" apply false
|
||||
}
|
||||
|
||||
application {
|
||||
@ -66,8 +66,9 @@ dependencies {
|
||||
implementation("com.viaversion:viabackwards:$vbVer") { isTransitive = false }
|
||||
implementation("com.github.ViaVersion.ViaRewind:viarewind-all:$vrVer") { isTransitive = false }
|
||||
|
||||
implementation("io.netty:netty-all:4.1.65.Final")
|
||||
implementation("io.netty:netty-all:4.1.66.Final")
|
||||
implementation("io.netty:netty-tcnative-boringssl-static:2.0.40.Final")
|
||||
implementation("io.netty.incubator:netty-incubator-transport-native-io_uring:0.0.8.Final:linux-x86_64")
|
||||
|
||||
implementation("com.google.guava:guava:30.1.1-jre")
|
||||
implementation("com.velocitypowered:velocity-native:3.0.0")
|
||||
@ -75,7 +76,7 @@ dependencies {
|
||||
implementation("org.yaml:snakeyaml:1.29")
|
||||
|
||||
val log4jVer = "2.14.1"
|
||||
val slf4jVer = "1.7.31"
|
||||
val slf4jVer = "1.7.32"
|
||||
implementation("net.minecrell:terminalconsoleappender:1.2.0")
|
||||
implementation("org.apache.logging.log4j:log4j-core:$log4jVer")
|
||||
implementation("org.apache.logging.log4j:log4j-iostreams:$log4jVer")
|
||||
@ -107,7 +108,6 @@ tasks {
|
||||
}
|
||||
build {
|
||||
dependsOn(shadowJar)
|
||||
dependsOn(named("dependencyUpdates"))
|
||||
}
|
||||
jar {
|
||||
manifest.attributes("Multi-Release" to "true")
|
||||
|
@ -30,6 +30,7 @@ import io.netty.handler.codec.dns.DefaultDnsQuestion
|
||||
import io.netty.handler.codec.dns.DefaultDnsRawRecord
|
||||
import io.netty.handler.codec.dns.DefaultDnsRecordDecoder
|
||||
import io.netty.handler.codec.dns.DnsRecordType
|
||||
import io.netty.incubator.channel.uring.*
|
||||
import io.netty.util.ReferenceCountUtil
|
||||
import org.slf4j.LoggerFactory
|
||||
import java.math.BigInteger
|
||||
@ -214,6 +215,7 @@ fun sha512Hex(data: ByteArray): String {
|
||||
|
||||
fun eventLoopGroup(): EventLoopGroup {
|
||||
return when {
|
||||
//IOUring.isAvailable() -> IOUringEventLoopGroup() // experimental
|
||||
Epoll.isAvailable() -> EpollEventLoopGroup()
|
||||
KQueue.isAvailable() -> KQueueEventLoopGroup()
|
||||
else -> NioEventLoopGroup()
|
||||
@ -222,6 +224,7 @@ fun eventLoopGroup(): EventLoopGroup {
|
||||
|
||||
fun channelServerSocketFactory(eventLoop: EventLoopGroup): ChannelFactory<ServerSocketChannel> {
|
||||
return when (eventLoop) {
|
||||
is IOUringEventLoopGroup -> ChannelFactory { IOUringServerSocketChannel() }
|
||||
is EpollEventLoopGroup -> ChannelFactory { EpollServerSocketChannel() }
|
||||
is KQueueEventLoopGroup -> ChannelFactory { KQueueServerSocketChannel() }
|
||||
else -> ChannelFactory { NioServerSocketChannel() }
|
||||
@ -230,6 +233,7 @@ fun channelServerSocketFactory(eventLoop: EventLoopGroup): ChannelFactory<Server
|
||||
|
||||
fun channelSocketFactory(eventLoop: EventLoopGroup): ChannelFactory<SocketChannel> {
|
||||
return when (eventLoop) {
|
||||
is IOUringEventLoopGroup -> ChannelFactory { IOUringSocketChannel() }
|
||||
is EpollEventLoopGroup -> ChannelFactory { EpollSocketChannel() }
|
||||
is KQueueEventLoopGroup -> ChannelFactory { KQueueSocketChannel() }
|
||||
else -> ChannelFactory { NioSocketChannel() }
|
||||
@ -238,6 +242,7 @@ fun channelSocketFactory(eventLoop: EventLoopGroup): ChannelFactory<SocketChanne
|
||||
|
||||
fun channelDatagramFactory(eventLoop: EventLoopGroup): ChannelFactory<DatagramChannel> {
|
||||
return when (eventLoop) {
|
||||
is IOUringEventLoopGroup -> ChannelFactory { IOUringDatagramChannel() }
|
||||
is EpollEventLoopGroup -> ChannelFactory { EpollDatagramChannel() }
|
||||
is KQueueEventLoopGroup -> ChannelFactory { KQueueDatagramChannel() }
|
||||
else -> ChannelFactory { NioDatagramChannel() }
|
||||
|
Loading…
Reference in New Issue
Block a user