build.gradle.kts 656 B

123456789101112131415161718192021222324252627282930
  1. plugins {
  2. id("otel.library-instrumentation")
  3. }
  4. base.archivesName.set("${base.archivesName.get()}-autoconfigure")
  5. dependencies {
  6. library("org.apache.logging.log4j:log4j-core:2.17.0")
  7. testImplementation(project(":instrumentation:log4j:log4j-context-data:log4j-context-data-common:testing"))
  8. }
  9. tasks {
  10. test {
  11. filter {
  12. excludeTestsMatching("LibraryLog4j2BaggageTest")
  13. }
  14. }
  15. val testAddBaggage by registering(Test::class) {
  16. filter {
  17. includeTestsMatching("LibraryLog4j2BaggageTest")
  18. }
  19. jvmArgs("-Dotel.instrumentation.log4j-context-data.add-baggage=true")
  20. }
  21. named("check") {
  22. dependsOn(testAddBaggage)
  23. }
  24. }