plugins {
  id 'java'
}

version = '1.11.0-SNAPSHOT'
group = 'me.frmr.kafka.connect'

repositories {
  mavenLocal()
  mavenCentral()
  maven {
    url "http://packages.confluent.io/maven/"
  }
}

ext {
  // You have to keep these synced - so confluent 4.1.0 builds against kafka connect 1.1.0.
  // You'll need to read the release notes for each confluent platform release to figure out
  // what version of Kafka it's built against
  kafkaVersion = '2.5.0'
  cpVersion = '5.5.1'

  junitVersion = '5.4.1'
  slf4jApiVersion = '1.7.25'
}

dependencies {
  // These libraries are marked compileOnly. Though they are required at runtime, the reality of
  // deploying software inside a Kafka Connect ecosystem is that it could be challenging to avoid
  // issues where we end up with multiple versions of the libraries on the classpath once all the
  // plugins are loaded. Our code should behave well so long as the version available at runtime
  // is binary compatible with the version we built against.
  compileOnly "org.apache.kafka:connect-api:$kafkaVersion"
  compileOnly "io.confluent:kafka-connect-avro-converter:$cpVersion"
  compileOnly "org.slf4j:slf4j-api:$slf4jApiVersion"

  testImplementation "org.apache.kafka:connect-api:$kafkaVersion"
  testImplementation "io.confluent:kafka-connect-avro-converter:$cpVersion"
  testImplementation 'org.apache.commons:commons-io:1.3.2'
  testImplementation "org.slf4j:slf4j-api:$slf4jApiVersion"
  testImplementation "org.junit.jupiter:junit-jupiter:$junitVersion"
}

test {
  useJUnitPlatform()
  testLogging {
    events "passed", "skipped", "failed"
  }
}
