build.gradle.kts 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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. compileOnly("com.google.auto.value:auto-value-annotations")
  15. annotationProcessor("com.google.auto.value:auto-value")
  16. testInstrumentation(project(":instrumentation:netty:netty-4.0:javaagent"))
  17. }
  18. otelJava {
  19. // AHC uses Unsafe and so does not run on later java version
  20. maxJavaVersionForTests.set(JavaVersion.VERSION_1_8)
  21. }
  22. // async-http-client 2.0.0 does not work with Netty versions newer than this due to referencing an
  23. // internal file.
  24. if (!(findProperty("testLatestDeps") as Boolean)) {
  25. configurations.configureEach {
  26. if (!name.contains("muzzle")) {
  27. resolutionStrategy {
  28. eachDependency {
  29. // specifying a fixed version for all libraries with io.netty' group
  30. if (requested.group == "io.netty" && requested.name != "netty-bom") {
  31. useVersion("4.0.34.Final")
  32. }
  33. }
  34. }
  35. }
  36. }
  37. }