/*
 * Copyright 2023 The Data Transfer Project Authors.
 *
 * 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
 *
 * https://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.
 */

buildscript {
  repositories {
    mavenCentral()
  }
  dependencies {
    classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.13'
  }
}

plugins {
  id 'java'
  id 'maven'
  id 'signing'
}

apply from: project.file('proto.gradle')

dependencies {
  compile project(':portability-spi-cloud')
  compile project(':portability-spi-transfer')
  compile project(':portability-transfer')

  compile("commons-io:commons-io:${apacheCommonIOVersion}")
  compile("org.apache.httpcomponents:httpclient:${apacheHttpVersion}")

  compileOnly "com.google.auto.value:auto-value-annotations:${autoValueVersion}"
  annotationProcessor "com.google.auto.value:auto-value:${autoValueVersion}"

  implementation("org.jetbrains:annotations:${jetBrainAnnotationVersion}")
  implementation("com.googlecode.json-simple:json-simple:${jsonSimpleVersion}")

  testCompile project(':portability-transfer').sourceSets.test.output
  testCompile project(':libraries:config').sourceSets.test.output

  testCompile("org.mockito:mockito-core:${mockitoCoreVersion}")
  testImplementation("org.mockito:mockito-inline:${mockitoInlineVersion}")
}

test {
  testLogging {
    events "failed"
    exceptionFormat "full"
  }
}

sourceSets {
  main {
    java {
      srcDirs = ['build/classes/java', 'src/main/java', 'src/protogen/main/java']
      outputDir = file('.out/classes/src')
    }
  }
  test {
    java {
      srcDirs = ['src/test/java']
    }
  }
}
