build.gradle.kts 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. plugins {
  2. id("otel.javaagent-instrumentation")
  3. }
  4. muzzle {
  5. pass {
  6. group.set("ch.qos.logback")
  7. module.set("logback-classic")
  8. versions.set("[0.9.16,)")
  9. skip("0.9.6") // has dependency on SNAPSHOT org.slf4j:slf4j-api:1.4.0-SNAPSHOT
  10. skip("0.8") // has dependency on non-existent org.slf4j:slf4j-api:1.1.0-RC0
  11. skip("0.6") // has dependency on pom only javax.jms:jms:1.1
  12. assertInverse.set(true)
  13. }
  14. }
  15. dependencies {
  16. // pin the version strictly to avoid overriding by dependencyManagement versions
  17. compileOnly("ch.qos.logback:logback-classic") {
  18. version {
  19. strictly("1.0.0")
  20. }
  21. }
  22. compileOnly("org.slf4j:slf4j-api") {
  23. version {
  24. strictly("1.5.8")
  25. }
  26. }
  27. if (findProperty("testLatestDeps") as Boolean) {
  28. testImplementation("ch.qos.logback:logback-classic:+")
  29. } else {
  30. testImplementation("ch.qos.logback:logback-classic") {
  31. version {
  32. strictly("1.0.0")
  33. }
  34. }
  35. testImplementation("org.slf4j:slf4j-api") {
  36. version {
  37. strictly("1.7.36")
  38. }
  39. }
  40. }
  41. compileOnly(project(":javaagent-bootstrap"))
  42. implementation(project(":instrumentation:logback:logback-appender-1.0:library"))
  43. testImplementation("org.awaitility:awaitility")
  44. }
  45. tasks.withType<Test>().configureEach {
  46. // TODO run tests both with and without experimental log attributes
  47. jvmArgs("-Dotel.instrumentation.logback-appender.experimental.capture-mdc-attributes=*")
  48. jvmArgs("-Dotel.instrumentation.logback-appender.experimental-log-attributes=true")
  49. jvmArgs("-Dotel.instrumentation.logback-appender.experimental.capture-code-attributes=true")
  50. jvmArgs("-Dotel.instrumentation.logback-appender.experimental.capture-marker-attribute=true")
  51. }