build.gradle.kts 1021 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. plugins {
  2. id("otel.javaagent-instrumentation")
  3. }
  4. muzzle {
  5. pass {
  6. group.set("org.asynchttpclient")
  7. module.set("async-http-client")
  8. versions.set("[2.0.0,)")
  9. assertInverse.set(true)
  10. }
  11. }
  12. dependencies {
  13. library("org.asynchttpclient:async-http-client:2.0.0")
  14. testInstrumentation(project(":instrumentation:netty:netty-4.0:javaagent"))
  15. }
  16. otelJava {
  17. // AHC uses Unsafe and so does not run on later java version
  18. maxJavaVersionForTests.set(JavaVersion.VERSION_1_8)
  19. }
  20. // async-http-client 2.0.0 does not work with Netty versions newer than this due to referencing an
  21. // internal file.
  22. if (!(findProperty("testLatestDeps") as Boolean)) {
  23. configurations.configureEach {
  24. if (!name.contains("muzzle")) {
  25. resolutionStrategy {
  26. eachDependency {
  27. // specifying a fixed version for all libraries with io.netty' group
  28. if (requested.group == "io.netty" && requested.name != "netty-bom") {
  29. useVersion("4.0.34.Final")
  30. }
  31. }
  32. }
  33. }
  34. }
  35. }