/*
 * Copyright Thoughtworks, Inc.
 *
 * Licensed 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.
 */

dependencies {
  annotationProcessor project.deps.lombok
  compileOnly project.deps.lombok

  implementation project.deps.commonsLang3
  implementation project.deps.gson
  implementation project.deps.jakartaAnnotation

  implementation(project.deps.liquibase) {
    // Not needed, according to https://github.com/liquibase/liquibase/issues/1866
    exclude group: 'javax.xml.bind', module: 'jaxb-api'

    // These dependencies used to be shaded, but are now directly added. However they seem only related to use of
    // CSV or YAML snapshots/changelogs and/or offline storage which does not seem relevant to GoCD.
    exclude group: 'org.yaml', module: 'snakeyaml'
    exclude group: 'com.opencsv', module: 'opencsv'
  }
  implementation project.deps.slf4jApi
  runtimeOnly project.deps.liquibaseSlf4j
  testRuntimeOnly project.deps.logback

  testImplementation project.deps.junit5Api
  testRuntimeOnly project.deps.junit5Engine
  testRuntimeOnly project.deps.junit5PlatformLauncher
  testImplementation project.deps.assertJ
  testImplementation project.deps.mockitoCore
  testImplementation project.deps.mockitoJunit5

  testImplementation project.deps.commonsDbcp
  testImplementation project.deps.h2
  testRuntimeOnly project(':db-support:db-support-h2')

  testFixturesApi(project.deps.testcontainersJdbc) {
    exclude group: 'junit' // Test containers depends on legacy junit, see https://github.com/testcontainers/testcontainers-java/issues/970
  }
  testFixturesImplementation project.deps.assertJ_DB
}
