mirror of
https://github.com/ViaVersion/VIAaaS.git
synced 2025-01-24 22:01:49 +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
|
# 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
|
# 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 ]
|
on: [ push, pull_request ]
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
@ -16,7 +16,7 @@ plugins {
|
|||||||
id("com.github.johnrengelman.shadow") version "7.0.0"
|
id("com.github.johnrengelman.shadow") version "7.0.0"
|
||||||
id("com.github.ben-manes.versions") version "0.39.0"
|
id("com.github.ben-manes.versions") version "0.39.0"
|
||||||
id("com.palantir.git-version") version "0.12.3"
|
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 {
|
application {
|
||||||
@ -66,8 +66,9 @@ dependencies {
|
|||||||
implementation("com.viaversion:viabackwards:$vbVer") { isTransitive = false }
|
implementation("com.viaversion:viabackwards:$vbVer") { isTransitive = false }
|
||||||
implementation("com.github.ViaVersion.ViaRewind:viarewind-all:$vrVer") { 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: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.google.guava:guava:30.1.1-jre")
|
||||||
implementation("com.velocitypowered:velocity-native:3.0.0")
|
implementation("com.velocitypowered:velocity-native:3.0.0")
|
||||||
@ -75,7 +76,7 @@ dependencies {
|
|||||||
implementation("org.yaml:snakeyaml:1.29")
|
implementation("org.yaml:snakeyaml:1.29")
|
||||||
|
|
||||||
val log4jVer = "2.14.1"
|
val log4jVer = "2.14.1"
|
||||||
val slf4jVer = "1.7.31"
|
val slf4jVer = "1.7.32"
|
||||||
implementation("net.minecrell:terminalconsoleappender:1.2.0")
|
implementation("net.minecrell:terminalconsoleappender:1.2.0")
|
||||||
implementation("org.apache.logging.log4j:log4j-core:$log4jVer")
|
implementation("org.apache.logging.log4j:log4j-core:$log4jVer")
|
||||||
implementation("org.apache.logging.log4j:log4j-iostreams:$log4jVer")
|
implementation("org.apache.logging.log4j:log4j-iostreams:$log4jVer")
|
||||||
@ -107,7 +108,6 @@ tasks {
|
|||||||
}
|
}
|
||||||
build {
|
build {
|
||||||
dependsOn(shadowJar)
|
dependsOn(shadowJar)
|
||||||
dependsOn(named("dependencyUpdates"))
|
|
||||||
}
|
}
|
||||||
jar {
|
jar {
|
||||||
manifest.attributes("Multi-Release" to "true")
|
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.DefaultDnsRawRecord
|
||||||
import io.netty.handler.codec.dns.DefaultDnsRecordDecoder
|
import io.netty.handler.codec.dns.DefaultDnsRecordDecoder
|
||||||
import io.netty.handler.codec.dns.DnsRecordType
|
import io.netty.handler.codec.dns.DnsRecordType
|
||||||
|
import io.netty.incubator.channel.uring.*
|
||||||
import io.netty.util.ReferenceCountUtil
|
import io.netty.util.ReferenceCountUtil
|
||||||
import org.slf4j.LoggerFactory
|
import org.slf4j.LoggerFactory
|
||||||
import java.math.BigInteger
|
import java.math.BigInteger
|
||||||
@ -214,6 +215,7 @@ fun sha512Hex(data: ByteArray): String {
|
|||||||
|
|
||||||
fun eventLoopGroup(): EventLoopGroup {
|
fun eventLoopGroup(): EventLoopGroup {
|
||||||
return when {
|
return when {
|
||||||
|
//IOUring.isAvailable() -> IOUringEventLoopGroup() // experimental
|
||||||
Epoll.isAvailable() -> EpollEventLoopGroup()
|
Epoll.isAvailable() -> EpollEventLoopGroup()
|
||||||
KQueue.isAvailable() -> KQueueEventLoopGroup()
|
KQueue.isAvailable() -> KQueueEventLoopGroup()
|
||||||
else -> NioEventLoopGroup()
|
else -> NioEventLoopGroup()
|
||||||
@ -222,6 +224,7 @@ fun eventLoopGroup(): EventLoopGroup {
|
|||||||
|
|
||||||
fun channelServerSocketFactory(eventLoop: EventLoopGroup): ChannelFactory<ServerSocketChannel> {
|
fun channelServerSocketFactory(eventLoop: EventLoopGroup): ChannelFactory<ServerSocketChannel> {
|
||||||
return when (eventLoop) {
|
return when (eventLoop) {
|
||||||
|
is IOUringEventLoopGroup -> ChannelFactory { IOUringServerSocketChannel() }
|
||||||
is EpollEventLoopGroup -> ChannelFactory { EpollServerSocketChannel() }
|
is EpollEventLoopGroup -> ChannelFactory { EpollServerSocketChannel() }
|
||||||
is KQueueEventLoopGroup -> ChannelFactory { KQueueServerSocketChannel() }
|
is KQueueEventLoopGroup -> ChannelFactory { KQueueServerSocketChannel() }
|
||||||
else -> ChannelFactory { NioServerSocketChannel() }
|
else -> ChannelFactory { NioServerSocketChannel() }
|
||||||
@ -230,6 +233,7 @@ fun channelServerSocketFactory(eventLoop: EventLoopGroup): ChannelFactory<Server
|
|||||||
|
|
||||||
fun channelSocketFactory(eventLoop: EventLoopGroup): ChannelFactory<SocketChannel> {
|
fun channelSocketFactory(eventLoop: EventLoopGroup): ChannelFactory<SocketChannel> {
|
||||||
return when (eventLoop) {
|
return when (eventLoop) {
|
||||||
|
is IOUringEventLoopGroup -> ChannelFactory { IOUringSocketChannel() }
|
||||||
is EpollEventLoopGroup -> ChannelFactory { EpollSocketChannel() }
|
is EpollEventLoopGroup -> ChannelFactory { EpollSocketChannel() }
|
||||||
is KQueueEventLoopGroup -> ChannelFactory { KQueueSocketChannel() }
|
is KQueueEventLoopGroup -> ChannelFactory { KQueueSocketChannel() }
|
||||||
else -> ChannelFactory { NioSocketChannel() }
|
else -> ChannelFactory { NioSocketChannel() }
|
||||||
@ -238,6 +242,7 @@ fun channelSocketFactory(eventLoop: EventLoopGroup): ChannelFactory<SocketChanne
|
|||||||
|
|
||||||
fun channelDatagramFactory(eventLoop: EventLoopGroup): ChannelFactory<DatagramChannel> {
|
fun channelDatagramFactory(eventLoop: EventLoopGroup): ChannelFactory<DatagramChannel> {
|
||||||
return when (eventLoop) {
|
return when (eventLoop) {
|
||||||
|
is IOUringEventLoopGroup -> ChannelFactory { IOUringDatagramChannel() }
|
||||||
is EpollEventLoopGroup -> ChannelFactory { EpollDatagramChannel() }
|
is EpollEventLoopGroup -> ChannelFactory { EpollDatagramChannel() }
|
||||||
is KQueueEventLoopGroup -> ChannelFactory { KQueueDatagramChannel() }
|
is KQueueEventLoopGroup -> ChannelFactory { KQueueDatagramChannel() }
|
||||||
else -> ChannelFactory { NioDatagramChannel() }
|
else -> ChannelFactory { NioDatagramChannel() }
|
||||||
|
Loading…
Reference in New Issue
Block a user