/*
 * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
 * or more contributor license agreements. Licensed under the "Elastic License
 * 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side
 * Public License v 1"; you may not use this file except in compliance with, at
 * your election, the "Elastic License 2.0", the "GNU Affero General Public
 * License v3.0 only", or the "Server Side Public License, v 1".
 */

// TODO: publish this when ready?
//apply plugin: 'elasticsearch.publish'
apply plugin: 'elasticsearch.build'
apply plugin: 'elasticsearch.internal-test-artifact'

dependencies {
  api project(':libs:core')
  api project(':libs:x-content')
  api "org.apache.lucene:lucene-core:${versions.lucene}"

  testImplementation(project(":test:framework")) {
    exclude group: 'org.elasticsearch', module: 'exponential-histogram'
  }
  testImplementation('ch.obermuhlner:big-math:2.3.2')
  testImplementation('org.apache.commons:commons-math3:3.6.1')
  testImplementation project(':libs:x-content:impl')
}

tasks.named('forbiddenApisMain').configure {
  // this lib does not depend on core, so only jdk signatures should be checked
  replaceSignatureFiles 'jdk-signatures'
}

ext.projectLicenses.set(['The Apache Software License, Version 2.0': providers.provider(() -> 'http://www.apache.org/licenses/LICENSE-2.0')])
licenseFile.set(layout.settingsDirectory.file('licenses/APACHE-LICENSE-2.0.txt').asFile)

tasks.named("licenseHeaders").configure {
  approvedLicenses = ['Apache', 'Generated', 'Vendored']
}


