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

esplugin {
    name = 'x-pack-async-search'
    description = 'A module which allows to track the progress of a search asynchronously.'
    classname ='org.elasticsearch.xpack.search.AsyncSearch'
    extendedPlugins = ['x-pack-core']
}
base {
  archivesName = 'x-pack-async-search'
}

dependencies {
  compileOnly project(":server")
  compileOnly project(path: xpackModule('core'))
  testImplementation testArtifact(project(':server'))
  testImplementation testArtifact(project(xpackModule('core')))
  testImplementation project(xpackModule('async'))

  internalClusterTestImplementation project(":modules:reindex")

  javaRestTestImplementation testArtifact(project(xpackModule('core')))

  clusterModules project(":x-pack:test:deprecated-query")
  clusterModules project(':modules:analysis-common')
  clusterModules project(':test:external-modules:test-error-query')
}

restResources {
  restApi {
    include '_common', 'indices', 'index', 'async_search'
  }
}
