build.gradle.kts 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. plugins {
  2. id("otel.javaagent-instrumentation")
  3. }
  4. muzzle {
  5. pass {
  6. group.set("org.elasticsearch.client")
  7. module.set("transport")
  8. versions.set("[5.3.0,6.0.0)")
  9. // version 7.11.0 depends on org.elasticsearch:elasticsearch:7.11.0 which depends on
  10. // org.elasticsearch:elasticsearch-plugin-classloader:7.11.0 which does not exist
  11. skip("7.11.0")
  12. assertInverse.set(true)
  13. }
  14. pass {
  15. group.set("org.elasticsearch")
  16. module.set("elasticsearch")
  17. versions.set("[5.3.0,6.0.0)")
  18. // version 7.11.0 depends on org.elasticsearch:elasticsearch-plugin-classloader:7.11.0
  19. // which does not exist
  20. skip("7.11.0")
  21. assertInverse.set(true)
  22. }
  23. }
  24. dependencies {
  25. compileOnly("org.elasticsearch.client:transport:5.3.0") {
  26. isTransitive = false
  27. }
  28. compileOnly("org.elasticsearch:elasticsearch:5.3.0") {
  29. // We don't need all its transitive dependencies when compiling and run tests against 5.5.0
  30. isTransitive = false
  31. }
  32. implementation(project(":instrumentation:elasticsearch:elasticsearch-transport-common:library"))
  33. testInstrumentation(project(":instrumentation:apache-httpasyncclient-4.1:javaagent"))
  34. testInstrumentation(project(":instrumentation:netty:netty-4.1:javaagent"))
  35. testInstrumentation(project(":instrumentation:spring:spring-data-1.8:javaagent"))
  36. testImplementation(project(":instrumentation:elasticsearch:elasticsearch-transport-common:testing"))
  37. testImplementation("org.apache.logging.log4j:log4j-core:2.11.0")
  38. testImplementation("org.apache.logging.log4j:log4j-api:2.11.0")
  39. // Unfortunately spring-data-elasticsearch requires 5.5.0
  40. testLibrary("org.elasticsearch.client:transport:5.5.0")
  41. testLibrary("org.elasticsearch.plugin:transport-netty3-client:5.3.0")
  42. testLibrary("org.springframework.data:spring-data-elasticsearch:3.0.0.RELEASE")
  43. latestDepTestLibrary("org.elasticsearch.plugin:transport-netty3-client:5.+") // see elasticsearch-transport-6.0 module
  44. latestDepTestLibrary("org.elasticsearch.client:transport:5.+") // see elasticsearch-transport-6.0 module
  45. latestDepTestLibrary("org.springframework.data:spring-data-elasticsearch:3.0.+")
  46. }
  47. tasks.withType<Test>().configureEach {
  48. // TODO run tests both with and without experimental span attributes
  49. jvmArgs("-Dotel.instrumentation.elasticsearch.experimental-span-attributes=true")
  50. }