/*
 * 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.
 */

description = 'APIs to allow GoCD to communicate with GoCD Plugins'

java {
  // For use of server-only plugins
  registerFeature('serverOnly') {
    usingSourceSet(sourceSets.create('serverOnly'))
  }
}
CapabilitySupport.extendMain(project, 'serverOnly')

dependencies {
  api project(':plugin-infra:go-plugin-api')
  api project(':plugin-infra:go-plugin-api-internal')
  serverOnlyApi project(':plugin-infra:go-plugin-config-repo')
  api project(':plugin-infra:go-plugin-domain')
  api project(':plugin-infra:go-plugin-infra')
  api project(':plugin-infra:plugin-metadata-store')

  implementation project(':domain')
  implementation project(':base')
  implementation project(':config:config-api')

  serverOnlyImplementation project.deps.jolt
  serverOnlyImplementation project.deps.joltJsonUtils

  implementation project.deps.commonsCollections4
  implementation project.deps.commonsCodec
  implementation project.deps.commonsLang3
  implementation project.deps.gson
  implementation project.deps.springContext
  compileOnly project.deps.jetBrainsAnnotations

  testImplementation localGroovy()
  testImplementation(testFixtures(project(":domain")))
  testImplementation(testFixtures(project(":config:config-api")))
  testImplementation project.deps.junit5Api
  testImplementation project.deps.mockitoCore
  testImplementation project.deps.mockitoJunit5
  testRuntimeOnly project.deps.junit5Engine
  testRuntimeOnly project.deps.junit5PlatformLauncher
  testImplementation project.deps.assertJ
  testImplementation project.deps.jsonUnit
}
