description = 'OpenTelemetry Javaagent testing commons'
group = 'io.opentelemetry.javaagent'

apply from: "$rootDir/gradle/java.gradle"
apply from: "$rootDir/gradle/publish.gradle"

dependencies {
  api deps.groovy
  api deps.spock
  implementation deps.junitApi

  api deps.opentelemetryApi
  api deps.opentelemetrySdk
  api deps.opentelemetrySdkMetrics
  api deps.opentelemetrySdkTesting

  implementation(deps.opentelemetryProto) {
    // Only need the proto, not gRPC.
    exclude group: 'io.grpc'
  }

  implementation deps.bytebuddy
  implementation deps.bytebuddyagent
  implementation deps.slf4j
  implementation deps.testLogging
  implementation deps.opentelemetryExtAnnotations

  api group: 'com.squareup.okhttp3', name: 'okhttp', version: '4.9.0'
  api group: 'com.squareup.okhttp3', name: 'logging-interceptor', version: '4.9.0'

  //TODO replace with Servlet API?
  implementation group: 'org.eclipse.jetty', name: 'jetty-server', version: '8.0.0.v20110901'

  annotationProcessor deps.autoservice
  compileOnly deps.autoservice

  testImplementation deps.assertj

  testImplementation project(':instrumentation-api')
  testImplementation project(':javaagent-api')
  testImplementation project(':javaagent-tooling')
  testImplementation project(':instrumentation:external-annotations:javaagent')

  // We have autoservices defined in test subtree, looks like we need this to be able to properly rebuild this
  testAnnotationProcessor deps.autoservice
  testCompileOnly deps.autoservice
}

javadoc.enabled = false
