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

muzzle {
  pass {
    group = "org.glassfish.grizzly"
    module = 'grizzly-http'
    versions = "[2.0,)"
    assertInverse = true
  }
}

dependencies {
  compileOnly group: 'org.glassfish.grizzly', name: 'grizzly-http', version: '2.0'

  testImplementation group: 'javax.xml.bind', name: 'jaxb-api', version: '2.2.3'
  testImplementation group: 'javax.ws.rs', name: 'javax.ws.rs-api', version: '2.0'
  testLibrary group: 'org.glassfish.jersey.containers', name: 'jersey-container-grizzly2-http', version: '2.0'

  latestDepTestLibrary group: 'org.glassfish.jersey.containers', name: 'jersey-container-grizzly2-http', version: '2.+'
  latestDepTestLibrary group: 'org.glassfish.jersey.inject', name: 'jersey-hk2', version: '2.+'
}

tasks.withType(Test) {
  jvmArgs "-Dotel.instrumentation.grizzly.enabled=true"
}