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

muzzle {
  pass {
    group = "org.eclipse.jetty"
    module = 'jetty-server'
    // jetty 11 uses servlet 5.0
    versions = "[8.0.0.v20110901,11)"
    assertInverse = true
  }
}

dependencies {
  library group: 'org.eclipse.jetty', name: 'jetty-server', version: '8.0.0.v20110901'
  implementation project(':instrumentation:servlet:servlet-3.0:javaagent')
  testInstrumentation project(':instrumentation:servlet:servlet-common:javaagent')

  // Don't want to conflict with jetty from the test server.
  testImplementation(project(':testing-common')) {
    exclude group: 'org.eclipse.jetty', module: 'jetty-server'
  }

  testLibrary group: 'org.eclipse.jetty', name: 'jetty-servlet', version: '8.0.0.v20110901'
  testLibrary group: 'org.eclipse.jetty', name: 'jetty-continuation', version: '8.0.0.v20110901'

  // Jetty 10 seems to refuse to run on java8.
  // TODO: we need to setup separate test for Jetty 10 when that is released.
  latestDepTestLibrary group: 'org.eclipse.jetty', name: 'jetty-server', version: '9.+'
  latestDepTestLibrary group: 'org.eclipse.jetty', name: 'jetty-servlet', version: '9.+'
  latestDepTestLibrary group: 'org.eclipse.jetty', name: 'jetty-continuation', version: '9.+'
}
