2015-01-09 23:55:35 +00:00
|
|
|
plugins {
|
|
|
|
id "com.jfrog.bintray" version "1.0"
|
2015-01-10 02:17:45 +00:00
|
|
|
id 'com.github.johnrengelman.shadow' version '1.2.0'
|
2015-07-04 22:02:35 +00:00
|
|
|
id "org.ajoberstar.github-pages" version "1.2.0"
|
|
|
|
id "org.asciidoctor.gradle.asciidoctor" version "1.5.1"
|
|
|
|
id 'groovy'
|
|
|
|
id 'application'
|
2015-01-09 23:55:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
group = "com.github.lookout"
|
|
|
|
description = "A utility for monitoring the delay of Kafka consumers"
|
2015-09-01 21:21:38 +00:00
|
|
|
version = '0.4.0'
|
2015-01-09 23:55:35 +00:00
|
|
|
mainClassName = 'com.github.lookout.verspaetung.Main'
|
2015-07-04 22:02:35 +00:00
|
|
|
defaultTasks 'check', 'assemble'
|
2015-01-26 17:39:34 +00:00
|
|
|
|
2015-01-09 23:55:35 +00:00
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
// 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"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
// DEPENDENCY MANAGEMENT
|
|
|
|
repositories {
|
|
|
|
jcenter()
|
2015-08-14 17:03:37 +00:00
|
|
|
/* needed for forked metrics library */
|
2015-03-20 17:58:45 +00:00
|
|
|
maven { url 'https://dl.bintray.com/lookout/systems' }
|
2015-01-09 23:55:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2015-07-04 20:40:25 +00:00
|
|
|
compile 'org.codehaus.groovy:groovy-all:2.4.3+'
|
2015-01-09 23:55:35 +00:00
|
|
|
|
2015-01-17 22:34:00 +00:00
|
|
|
[
|
|
|
|
'curator-framework',
|
|
|
|
'curator-recipes',
|
|
|
|
].each { artifactName ->
|
|
|
|
compile("org.apache.curator:${artifactName}:2.7.0")
|
|
|
|
}
|
|
|
|
|
2015-01-20 22:18:09 +00:00
|
|
|
/* We need the Kafka client libraries so we can fetch broker metadata
|
|
|
|
* directly from the cluster
|
|
|
|
*/
|
2015-01-09 23:55:35 +00:00
|
|
|
compile 'org.apache.kafka:kafka_2.10:0.8.1.+'
|
|
|
|
|
2015-01-20 22:18:09 +00:00
|
|
|
/* Needed for command line options parsing */
|
|
|
|
compile 'commons-cli:commons-cli:1.2+'
|
|
|
|
|
2015-03-20 17:58:45 +00:00
|
|
|
compile 'com.github.lookout:metrics-datadog:0.1.3'
|
2015-01-10 02:17:45 +00:00
|
|
|
|
2015-01-30 15:30:15 +00:00
|
|
|
['metrics-core', 'metrics-graphite'].each { artifactName ->
|
|
|
|
compile "io.dropwizard.metrics:${artifactName}:3.1.0"
|
|
|
|
}
|
|
|
|
|
2015-01-26 12:09:47 +00:00
|
|
|
/* Logback is to be used for logging through the app */
|
|
|
|
compile 'ch.qos.logback:logback-classic:1.1.2+'
|
|
|
|
|
2015-01-09 23:55:35 +00:00
|
|
|
testCompile 'org.spockframework:spock-core:0.7-groovy-2.0'
|
|
|
|
testCompile 'cglib:cglib-nodep:2.2.+'
|
|
|
|
}
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
2015-07-04 22:02:35 +00:00
|
|
|
// PUBLISHING/DOCUMENTATION
|
|
|
|
assemble.dependsOn groovydoc
|
|
|
|
|
|
|
|
asciidoctor {
|
|
|
|
/* Using a single backend, so skipping the html5/ output dir */
|
|
|
|
separateOutputDirs false
|
2015-01-26 17:39:34 +00:00
|
|
|
}
|
2015-07-04 22:02:35 +00:00
|
|
|
assemble.dependsOn asciidoctor
|
|
|
|
|
|
|
|
githubPages {
|
|
|
|
repoUri = 'git@github.com:lookout/verspaetung.git'
|
|
|
|
pages {
|
|
|
|
into('groovydoc') { from groovydoc }
|
|
|
|
from asciidoctor
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
2015-01-10 02:17:45 +00:00
|
|
|
shadowJar {
|
|
|
|
exclude 'META-INF/*.RSA', 'META-INF/*.DSA'
|
|
|
|
manifest {
|
|
|
|
attributes 'Main-Class' : mainClassName
|
|
|
|
}
|
|
|
|
|
|
|
|
dependsOn check
|
|
|
|
}
|
|
|
|
assemble.dependsOn shadowJar
|
|
|
|
|
2015-01-26 17:39:34 +00:00
|
|
|
artifacts {
|
|
|
|
archives shadowJar
|
|
|
|
}
|
|
|
|
|
2015-09-01 21:21:38 +00:00
|
|
|
/*
|
|
|
|
* https://github.com/lookout/verspaetung/issues/28
|
|
|
|
*
|
|
|
|
* disable the distZip and distTar tasks since we only need the shadow jar
|
|
|
|
*/
|
|
|
|
distZip.enabled = false
|
|
|
|
distTar.enabled = false
|
|
|
|
|
2015-07-04 22:02:35 +00:00
|
|
|
/* We're not building a library jar so we'll disable this default jar task */
|
|
|
|
jar.enabled = false
|
2015-07-04 21:27:46 +00:00
|
|
|
/* Remove the "library" jar from the archives configuration so it's not
|
|
|
|
* published
|
|
|
|
*/
|
|
|
|
configurations.archives.artifacts.removeAll { it.archiveTask.is jar }
|
|
|
|
|
2015-01-09 23:55:35 +00:00
|
|
|
|
|
|
|
bintray {
|
|
|
|
user = project.bintrayUser
|
|
|
|
key = project.bintrayKey
|
|
|
|
publish = true
|
2015-07-04 21:02:58 +00:00
|
|
|
/*
|
|
|
|
* Only only publish when we're tagging a release and if we've executed on
|
|
|
|
* the JDK7 build. This is to prevent multiple attempts by the build matrix
|
|
|
|
* to publish the artifacts
|
|
|
|
*/
|
|
|
|
dryRun = !((System.env.TRAVIS_TAG as boolean) && (System.env.TRAVIS_JDK_VERSION == 'oraclejdk7'))
|
2015-01-09 23:55:35 +00:00
|
|
|
configurations = ['archives']
|
|
|
|
|
|
|
|
pkg {
|
|
|
|
userOrg = 'lookout'
|
|
|
|
repo = 'systems'
|
|
|
|
name = 'verspaetung'
|
|
|
|
labels = []
|
|
|
|
|
|
|
|
version {
|
|
|
|
name = project.version
|
|
|
|
vcsTag = "v${project.version}"
|
|
|
|
desc = project.description
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
bintrayUpload.dependsOn assemble
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|