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

muzzle {
  pass {
    group = "org.elasticsearch.client"
    module = "transport"
    versions = "[5.0.0,5.3.0)"
    // TODO (trask) try to remove the skipVersions in the future
    //  not sure what's wrong with this recent version, hopefully just publishing blip that
    //  will work itself out
    skipVersions += ['7.11.0']
    assertInverse = true
  }
  pass {
    group = "org.elasticsearch"
    module = "elasticsearch"
    versions = "[5.0.0,5.3.0)"
    // TODO (trask) try to remove the skipVersions in the future
    //  not sure what's wrong with this recent version, hopefully just publishing blip that
    //  will work itself out
    skipVersions += ['7.11.0']
    assertInverse = true
  }
}

dependencies {
  compileOnly group: 'org.elasticsearch.client', name: 'transport', version: '5.0.0'

  implementation project(':instrumentation:elasticsearch:elasticsearch-transport-common:javaagent')

  // Ensure no cross interference
  testInstrumentation project(':instrumentation:elasticsearch:elasticsearch-rest-5.0:javaagent')
  testInstrumentation project(':instrumentation:apache-httpasyncclient-4.1:javaagent')
  testInstrumentation project(':instrumentation:netty:netty-4.1:javaagent')

  testImplementation group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.11.0'
  testImplementation group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.11.0'

  testImplementation group: 'org.elasticsearch.plugin', name: 'transport-netty3-client', version: '5.0.0'
  testImplementation group: 'org.elasticsearch.client', name: 'transport', version: '5.0.0'
}
