build.gradle.kts 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. plugins {
  2. id("otel.java-conventions")
  3. id("otel.publish-conventions")
  4. }
  5. description = "OpenTelemetry Javaagent testing commons"
  6. group = "io.opentelemetry.javaagent"
  7. sourceSets {
  8. main {
  9. val armeriaShadedDeps = project(":testing:armeria-shaded-for-testing")
  10. output.dir(armeriaShadedDeps.file("build/extracted/shadow"), "builtBy" to ":testing:armeria-shaded-for-testing:extractShadowJar")
  11. }
  12. }
  13. dependencies {
  14. api("org.apache.groovy:groovy")
  15. api("org.apache.groovy:groovy-json")
  16. api("org.spockframework:spock-core") {
  17. // exclude optional dependencies
  18. exclude(group = "cglib", module = "cglib-nodep")
  19. exclude(group = "net.bytebuddy", module = "byte-buddy")
  20. exclude(group = "org.junit.platform", module = "junit-platform-testkit")
  21. exclude(group = "org.jetbrains", module = "annotations")
  22. exclude(group = "org.objenesis", module = "objenesis")
  23. exclude(group = "org.ow2.asm", module = "asm")
  24. }
  25. api("org.spockframework:spock-junit4") {
  26. // spock-core is already added as dependency
  27. // exclude it here to avoid pulling in optional dependencies
  28. exclude(group = "org.spockframework", module = "spock-core")
  29. }
  30. api("org.junit.jupiter:junit-jupiter-api")
  31. api("org.junit.jupiter:junit-jupiter-params")
  32. api("io.opentelemetry:opentelemetry-api")
  33. api("io.opentelemetry:opentelemetry-sdk")
  34. api("io.opentelemetry:opentelemetry-sdk-testing")
  35. api("io.opentelemetry.semconv:opentelemetry-semconv-incubating")
  36. api(project(":instrumentation-api"))
  37. api("org.assertj:assertj-core")
  38. // Needs to be api dependency due to Spock restriction.
  39. api("org.awaitility:awaitility")
  40. api("com.google.guava:guava")
  41. api("org.mockito:mockito-core")
  42. api("org.slf4j:slf4j-api")
  43. compileOnly(project(":testing:armeria-shaded-for-testing", configuration = "shadow"))
  44. compileOnly(project(":javaagent-bootstrap"))
  45. compileOnly("com.google.auto.value:auto-value-annotations")
  46. annotationProcessor("com.google.auto.value:auto-value")
  47. implementation("io.opentelemetry.proto:opentelemetry-proto")
  48. implementation("net.bytebuddy:byte-buddy")
  49. implementation("ch.qos.logback:logback-classic")
  50. implementation("org.slf4j:log4j-over-slf4j")
  51. implementation("org.slf4j:jcl-over-slf4j")
  52. implementation("org.slf4j:jul-to-slf4j")
  53. implementation("io.opentelemetry:opentelemetry-exporter-logging")
  54. api(project(":instrumentation-api-incubator"))
  55. annotationProcessor("com.google.auto.service:auto-service")
  56. compileOnly("com.google.auto.service:auto-service")
  57. testImplementation(project(":javaagent-tooling"))
  58. testImplementation(project(":javaagent-bootstrap"))
  59. testImplementation(project(":javaagent-extension-api"))
  60. testImplementation(project(":instrumentation:external-annotations:javaagent"))
  61. // We have autoservices defined in test subtree, looks like we need this to be able to properly rebuild this
  62. testAnnotationProcessor("com.google.auto.service:auto-service")
  63. testCompileOnly("com.google.auto.service:auto-service")
  64. }
  65. tasks {
  66. javadoc {
  67. enabled = false
  68. }
  69. }