apply from: "$rootDir/gradle/instrumentation.gradle"

muzzle {
  pass {
    group = "javax.ws.rs"
    module = "javax.ws.rs-api"
    versions = "[2.0,)"
  }
  pass {
    // We want to support the dropwizard clients too.
    group = 'io.dropwizard'
    module = 'dropwizard-client'
    versions = "[0.8.0,)"
    assertInverse = true
  }
}

dependencies {
  compileOnly group: 'javax.ws.rs', name: 'javax.ws.rs-api', version: '2.0.1'
  compileOnly group: 'javax.annotation', name: 'javax.annotation-api', version: '1.3.2'

  testInstrumentation project(':instrumentation:jaxrs-client:jaxrs-client-2.0:jaxrs-client-2.0-cxf-3.0:javaagent')
  testInstrumentation project(':instrumentation:jaxrs-client:jaxrs-client-2.0:jaxrs-client-2.0-jersey-2.0:javaagent')
  testInstrumentation project(':instrumentation:jaxrs-client:jaxrs-client-2.0:jaxrs-client-2.0-resteasy-2.0:javaagent')

  testImplementation group: 'javax.ws.rs', name: 'javax.ws.rs-api', version: '2.0.1'

  testLibrary group: 'org.glassfish.jersey.core', name: 'jersey-client', version: '2.0'
  testLibrary group: 'org.jboss.resteasy', name: 'resteasy-client', version: '3.0.5.Final'
  // ^ This version has timeouts https://issues.redhat.com/browse/RESTEASY-975
  testLibrary group: 'org.apache.cxf', name: 'cxf-rt-rs-client', version: '3.1.0'
  // Doesn't work with CXF 3.0.x because their context is wrong:
  // https://github.com/apache/cxf/commit/335c7bad2436f08d6d54180212df5a52157c9f21

  testImplementation group: 'javax.xml.bind', name: 'jaxb-api', version: '2.2.3'

  testInstrumentation project(':instrumentation:apache-httpclient:apache-httpclient-4.0:javaagent')

  latestDepTestLibrary group: 'org.glassfish.jersey.inject', name: 'jersey-hk2', version: '2.+'
  latestDepTestLibrary group: 'org.glassfish.jersey.core', name: 'jersey-client', version: '2.+'
  latestDepTestLibrary group: 'org.jboss.resteasy', name: 'resteasy-client', version: '3.0.26.Final'
}
