build.gradle.kts 1.0 KB

123456789101112131415161718192021222324252627282930313233343536
  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-testing"))
  26. }
  27. tasks {
  28. named<Test>("test") {
  29. usesService(gradle.sharedServices.registrations["testcontainersBuildService"].getService())
  30. }
  31. }