build.gradle.kts 1010 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. plugins {
  2. id("otel.java-conventions")
  3. war
  4. }
  5. dependencies {
  6. testImplementation(project(":instrumentation:runtime-telemetry:runtime-telemetry-java8:javaagent"))
  7. testImplementation("io.opentelemetry:opentelemetry-sdk-testing")
  8. // Bring in various archives to test introspection logic
  9. testImplementation("io.opentelemetry:opentelemetry-api")
  10. testImplementation("io.opentelemetry:opentelemetry-api-incubator")
  11. testImplementation("org.springframework:spring-webmvc:3.1.0.RELEASE")
  12. testImplementation("com.google.guava:guava")
  13. }
  14. tasks.war {
  15. archiveFileName.set("app.war")
  16. manifest {
  17. attributes(
  18. "Implementation-Title" to "Dummy App",
  19. "Implementation-Vendor" to "OpenTelemetry",
  20. )
  21. }
  22. }
  23. tasks.named("test") {
  24. dependsOn(tasks.getByName("war"))
  25. }
  26. tasks {
  27. withType<Test>().configureEach {
  28. environment(
  29. mapOf(
  30. // Expose dummy app war location to test
  31. "DUMMY_APP_WAR" to "${layout.buildDirectory.asFile.get()}/libs/app.war"
  32. )
  33. )
  34. }
  35. }