/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

plugins {
  id 'standard-subproject-configuration'
  id 'geode-publish-java'
}

dependencies {
  api(platform(project(':boms:geode-all-bom')))

  api(project(':geode-core'))
  api('org.apache.lucene:lucene-core')

  implementation(project(':geode-gfsh'))
  implementation(project(':geode-logging'))
  implementation(project(':geode-membership'))
  implementation(project(':geode-serialization'))
  implementation('org.apache.lucene:lucene-analyzers-common')
  implementation('org.apache.lucene:lucene-queryparser') {
    exclude module: 'lucene-sandbox'
  }
  implementation('org.apache.commons:commons-lang3')
  implementation('org.apache.logging.log4j:log4j-api')

  // JAXB dependencies needed for Java 11+
  implementation('javax.xml.bind:jaxb-api')
  implementation('com.sun.xml.bind:jaxb-impl')

  compileOnly(platform(project(':boms:geode-all-bom')))
  compileOnly('com.fasterxml.jackson.core:jackson-annotations')

  runtimeOnly('org.apache.lucene:lucene-analyzers-phonetic')


  testImplementation(project(':geode-junit'))
  testImplementation(project(':geode-lucene:geode-lucene-test'))
  testImplementation('org.apache.lucene:lucene-test-framework')
  testImplementation('com.pholser:junit-quickcheck-generators')
  testImplementation('pl.pragmatists:JUnitParams')
  testImplementation('com.pholser:junit-quickcheck-core')
  testImplementation('com.carrotsearch.randomizedtesting:randomizedtesting-runner')


  distributedTestImplementation(project(':geode-junit'))
  distributedTestImplementation(project(':geode-dunit'))
  distributedTestImplementation(project(':geode-lucene:geode-lucene-test'))
  distributedTestImplementation('pl.pragmatists:JUnitParams')
  distributedTestImplementation('org.hamcrest:hamcrest')


  integrationTestImplementation(project(':geode-dunit'))
  integrationTestImplementation(project(':geode-lucene:geode-lucene-test'))
  integrationTestImplementation('org.apache.lucene:lucene-analyzers-phonetic')
  integrationTestImplementation('pl.pragmatists:JUnitParams')


  upgradeTestImplementation(project(':geode-dunit'))
  upgradeTestImplementation('commons-io:commons-io')
  upgradeTestRuntimeOnly(project(path: ':geode-old-versions', configuration: 'classpathsOutput'))


  performanceTestImplementation(project(':geode-junit'))
  performanceTestImplementation(project(':geode-lucene:geode-lucene-test'))
}

//The lucene integration tests don't have any issues that requiring forking
integrationTest.forkEvery 0
