Skip to content

Instantly share code, notes, and snippets.

@schroedermatt
Created June 21, 2018 17:16
Show Gist options
  • Save schroedermatt/699c1bf3115b0fd49540b69c170a654a to your computer and use it in GitHub Desktop.
Save schroedermatt/699c1bf3115b0fd49540b69c170a654a to your computer and use it in GitHub Desktop.
Gradle build file for Kotlin Kafka Connector
buildscript {
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "com.github.jengelman.gradle.plugins:shadow:$shadow_version"
}
}
plugins {
id 'idea'
id 'com.palantir.git-version' version '0.5.2'
id 'com.github.johnrengelman.shadow' version '2.0.4'
}
// configuration for all projects
allprojects {
group = 'com.mschroeder.kafka.connect.spotify'
version = versionDetails().lastTag.replaceAll(/^v/,'')
repositories {
jcenter()
}
// configure kotlin
apply plugin: 'kotlin'
compileKotlin {
kotlinOptions {
jvmTarget = '1.8'
javaParameters = true
}
}
dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
}
}
// build uber JAR using shadow plugin (http://imperceptiblethoughts.com/shadow)
shadowJar {
dependencies {
// exclude dependencies provided in the kafka connect classpath
exclude dependency("org.apache.kafka:connect-api:$kafka_version")
exclude dependency("org.apache.kafka:kafka-clients:$kafka_version")
exclude dependency('net.jpountz.lz4:.*:.*')
exclude dependency('org.xerial.snappy:.*:.*')
exclude dependency('org.slf4j:.*:.*')
}
}
// pull in sub-project dependencies
dependencies {
compile project(':source')
compile project(':sink')
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment