import org.elasticsearch.gradle.test.RestIntegTestTask

buildscript {
  repositories {
    mavenCentral()
    jcenter()
  }

  dependencies {
    classpath "org.elasticsearch.gradle:build-tools:6.2.4"
  }
}

group = 'org.elasticsearch.plugin.aknn'
version = '0.0.1-SNAPSHOT'

apply plugin: 'java'
apply plugin: 'elasticsearch.esplugin'
apply plugin: 'idea'

// license of this project
licenseFile = rootProject.file('LICENSE.txt')

// copyright notices
noticeFile = rootProject.file('NOTICE.txt')

esplugin {
  name 'elasticsearch-aknn'
  description 'Elasticsearch plugin for approximate K-nearest-neighbors search'
  classname 'org.elasticsearch.plugin.aknn.AknnPlugin'
  // license of the plugin, may be different than the above license
  licenseFile rootProject.file('LICENSE.txt')
  // copyright notices, may be different than the above notice
  noticeFile rootProject.file('NOTICE.txt')
}

// In this section you declare the dependencies for your production and test code
// TODO: See https://youtu.be/7alCuE7cNVQ?t=12m41s for a potential solution to original ND4J problems.
dependencies {
    compile 'org.apache.commons:commons-math3:3.6.1'
}

test {
    enabled true
    testLoggingConfig.setOutputMode(
        com.carrotsearch.gradle.junit4.TestLoggingConfiguration.OutputMode.ALWAYS
    )
}

integTestRunner {
    enabled true
    testLoggingConfig.setOutputMode(
        com.carrotsearch.gradle.junit4.TestLoggingConfiguration.OutputMode.ALWAYS
    )
}

// Set to false to not use elasticsearch checkstyle rules.
checkstyleMain.enabled = true
checkstyleTest.enabled = true

// FIXME dependency license check needs to be enabled
dependencyLicenses.enabled = false

// FIXME thirdparty audit needs to be enabled
thirdPartyAudit.enabled = false
