0

I'm currently working on implementing HTTP3 server using the Gradle version 7.3 on a Ubuntu 20.04 VM. But QUIC codec (0.0.20.Final) and HTTP/3 codec (0.0.11.Final) dependencies produce the following error.

   Could not find netty-incubator-codec-native-quic-0.0.25.Final-${os.detected.name}-${os.detected.arch}.jar (io.netty.incubator:netty-incubator-codec-native-quic:0.0.25.Final).

Possible solution:
 - Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html

Following are the dependencies I used

implementation 'io.netty.incubator:netty-incubator-codec-quic:0.0.20.Final:linux-x86_64'
implementation 'io.netty.incubator:netty-incubator-codec-http3:0.0.11.Final'
mhg99
  • 1
  • did you find a solution to this? I have the same issue. I was able to make it work with maven (pom.xml) ` io.netty.incubator netty-incubator-codec-quic 0.0.20.Final linux-x86_64 io.netty.incubator netty-incubator-codec-http3 0.0.11.Final ` – dimitris boutas Feb 05 '22 at 14:42
  • No still didn’t find anything. And yeah worked with maven for me too. – mhg99 Apr 08 '22 at 11:35

2 Answers2

0

As a temporary solution I downloaded the jar of the dependency from here and referenced it in the build.gradle file.

implementation ("io.netty.incubator:netty-incubator-codec-quic:0.0.20.Final:linux-x86_64")
implementation (files("libs/netty-incubator-codec-http3-0.0.11.Final.jar"))
dimitris boutas
  • 343
  • 4
  • 5
  • Yeah that's how I’m using for now. But need to find a way to work with the dependencies – mhg99 Apr 08 '22 at 11:37
0

Gradle is struggling to parse the classifier for the quic dependency, which is a property defined in terms of other properties, which are meant to be detected at build-time.

To work around that, exclude the quic dependency from your http3 dependency, and instead pull in quic directly:

implementation ( "io.netty.incubator:netty-incubator-codec-http3:0.0.11.Final" ) {
    exclude group: "io.netty.incubator"
}
implementation "io.netty.incubator:netty-incubator-codec-native-quic:0.0.27.Final"
runtimeOnly ( group: "io.netty.incubator", name: "netty-incubator-codec-native-quic", classifier: "osx-x86_64" )
runtimeOnly ( group: "io.netty.incubator", name: "netty-incubator-codec-native-quic", classifier: "linux-x86_64" )
Chris Vest
  • 8,642
  • 3
  • 35
  • 43