apply plugin: 'elasticsearch.internal-java-rest-test'
apply plugin: 'elasticsearch.base-internal-es-plugin'

esplugin {
  name = 'spi-extension'
  description = 'An example spi extension plugin for security'
  classname = 'org.elasticsearch.example.SpiExtensionPlugin'
  extendedPlugins = ['x-pack-security']
}

dependencies {
  compileOnly project(':x-pack:plugin:core')
  testImplementation project(':x-pack:plugin:core')
  javaRestTestImplementation project(':x-pack:plugin:core')
  // let the javaRestTest see the classpath of main
  javaRestTestImplementation project.sourceSets.main.runtimeClasspath
  javaRestTestImplementation project(':modules:rest-root')
}

tasks.named("javaRestTest").configure {
  usesDefaultDistribution("security features require default distribution")
}
