Skip to content

Instantly share code, notes, and snippets.

@punneng
Created July 2, 2018 17:57
Show Gist options
  • Select an option

  • Save punneng/a229bb8d3b9d5b3af070a98093a4b048 to your computer and use it in GitHub Desktop.

Select an option

Save punneng/a229bb8d3b9d5b3af070a98093a4b048 to your computer and use it in GitHub Desktop.
buildscript {
ext.kotlin_version = '1.2.50'
repositories {
mavenCentral()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
apply plugin: 'application'
apply plugin: "kotlin"
mainClassName = 'EsConsumerKt'
version '1.0-SNAPSHOT'
repositories {
mavenCentral()
}
dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
compile group: 'org.apache.kafka', name: 'kafka-clients', version: '1.1.0'
compile group: 'org.apache.kafka', name: 'connect-json', version: '1.1.0'
compile group: 'org.elasticsearch', name: 'elasticsearch', version: '6.3.0'
compile group: 'org.elasticsearch.client', name: 'elasticsearch-rest-high-level-client', version: '6.3.0'
}
task fatJar(type: Jar) {
manifest {
attributes 'Implementation-Title': 'ES consumer',
'Implementation-Version': version,
'Main-Class': 'EsConsumerKt'
}
baseName = project.name + '-all'
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
with jar
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment