104 lines
2.7 KiB
Groovy
104 lines
2.7 KiB
Groovy
plugins {
|
|
id "com.jfrog.bintray" version "1.0"
|
|
id 'com.github.johnrengelman.shadow' version '1.2.0'
|
|
}
|
|
apply plugin: 'groovy'
|
|
apply plugin: 'application'
|
|
|
|
group = "com.github.lookout"
|
|
description = "A utility for monitoring the delay of Kafka consumers"
|
|
version = '0.1.0-SNAPSHOT'
|
|
mainClassName = 'com.github.lookout.verspaetung.Main'
|
|
defaulTasks ['clean', 'check']
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
// TESTING
|
|
test {
|
|
testLogging {
|
|
/* we want more test failure information, see:
|
|
* <http://mrhaki.blogspot.com/2013/05/gradle-goodness-show-more-information.html>
|
|
*/
|
|
exceptionFormat = 'full'
|
|
events "passed", "skipped", "failed", "standardOut", "standardError"
|
|
}
|
|
}
|
|
|
|
run {
|
|
args zookeeperHosts
|
|
}
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
// DEPENDENCY MANAGEMENT
|
|
repositories {
|
|
mavenCentral()
|
|
jcenter()
|
|
|
|
maven { url 'https://dl.bintray.com/rtyler/maven' }
|
|
}
|
|
|
|
dependencies {
|
|
compile 'org.codehaus.groovy:groovy-all:2.4.0+'
|
|
|
|
[
|
|
'curator-framework',
|
|
'curator-recipes',
|
|
].each { artifactName ->
|
|
compile("org.apache.curator:${artifactName}:2.7.0")
|
|
}
|
|
|
|
/* We need the Kafka client libraries so we can fetch broker metadata
|
|
* directly from the cluster
|
|
*/
|
|
compile 'org.apache.kafka:kafka_2.10:0.8.1.+'
|
|
|
|
/* Needed for command line options parsing */
|
|
compile 'commons-cli:commons-cli:1.2+'
|
|
|
|
compile 'com.timgroup:java-statsd-client:3.1.0+'
|
|
|
|
/* Logback is to be used for logging through the app */
|
|
compile 'ch.qos.logback:logback-classic:1.1.2+'
|
|
|
|
testCompile 'org.spockframework:spock-core:0.7-groovy-2.0'
|
|
testCompile 'cglib:cglib-nodep:2.2.+'
|
|
}
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
shadowJar {
|
|
exclude 'META-INF/*.RSA', 'META-INF/*.DSA'
|
|
manifest {
|
|
attributes 'Main-Class' : mainClassName
|
|
}
|
|
|
|
dependsOn check
|
|
}
|
|
assemble.dependsOn shadowJar
|
|
|
|
|
|
bintray {
|
|
user = project.bintrayUser
|
|
key = project.bintrayKey
|
|
publish = true
|
|
dryRun = false
|
|
configurations = ['archives']
|
|
|
|
pkg {
|
|
userOrg = 'lookout'
|
|
repo = 'systems'
|
|
name = 'verspaetung'
|
|
labels = []
|
|
|
|
version {
|
|
name = project.version
|
|
vcsTag = "v${project.version}"
|
|
desc = project.description
|
|
}
|
|
}
|
|
}
|
|
bintrayUpload.dependsOn assemble
|
|
////////////////////////////////////////////////////////////////////////////////
|