build.gradle.kts 707 B

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