/*
 * This project contains XContent protocol classes shared between server and http client
 */
apply plugin: 'elasticsearch.build'

description = 'Request and response objects shared by the cli, jdbc ' +
  'and the Elasticsearch plugin'

dependencies {
  api "com.fasterxml.jackson.core:jackson-core:${versions.jackson}"
  api "com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:${versions.jackson}"

  testImplementation project(":libs:x-content")
  testImplementation(project(":test:framework")) {
    exclude group: 'org.elasticsearch', module: 'x-content'
  }
}

java {
  targetCompatibility = JavaVersion.VERSION_1_8
  sourceCompatibility = JavaVersion.VERSION_1_8
}

tasks.named("compileTestJava").configure {
  targetCompatibility = buildParams.getMinimumRuntimeVersion()
  sourceCompatibility = buildParams.getMinimumRuntimeVersion()
}

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

tasks.named("dependencyLicenses").configure {
  mapping from: /jackson-.*/, to: 'jackson'
}

tasks.named("thirdPartyAudit").configure {
  ignoreMissingClasses(
        'com.fasterxml.jackson.databind.ObjectMapper',
        'com.fasterxml.jackson.databind.cfg.MapperBuilder'
  )
}
