build.gradle.kts 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. plugins {
  2. id("otel.javaagent-instrumentation")
  3. }
  4. muzzle {
  5. pass {
  6. group.set("org.mongodb")
  7. module.set("mongo-java-driver")
  8. versions.set("[3.7, 4.0)")
  9. assertInverse.set(true)
  10. }
  11. pass {
  12. group.set("org.mongodb")
  13. module.set("mongodb-driver-core")
  14. // this instrumentation is backwards compatible with early versions of the new API that shipped in 3.7
  15. // the legacy API instrumented in mongo-3.1 continues to be shipped in 4.x, but doesn't conflict here
  16. // because they are triggered by different types: MongoClientSettings(new) vs MongoClientOptions(legacy)
  17. versions.set("[3.7, 4.0)")
  18. assertInverse.set(true)
  19. }
  20. }
  21. dependencies {
  22. implementation(project(":instrumentation:mongo:mongo-3.1:library"))
  23. // a couple of test attribute verifications don't pass until 3.8.0
  24. library("org.mongodb:mongo-java-driver:3.8.0")
  25. testImplementation(project(":instrumentation:mongo:mongo-common:testing"))
  26. testInstrumentation(project(":instrumentation:mongo:mongo-async-3.3:javaagent"))
  27. testInstrumentation(project(":instrumentation:mongo:mongo-3.1:javaagent"))
  28. testInstrumentation(project(":instrumentation:mongo:mongo-4.0:javaagent"))
  29. }
  30. tasks {
  31. test {
  32. usesService(gradle.sharedServices.registrations["testcontainersBuildService"].getService())
  33. }
  34. }