/
build.gradle
84 lines (71 loc) · 2.1 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
buildscript {
repositories {
jcenter()
}
dependencies {
classpath "com.github.townsfolk:gradle-release:1.2"
classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:0.5"
}
}
apply plugin: "java"
apply plugin: "maven"
apply plugin: "maven-publish"
repositories {
jcenter()
}
dependencies {
compile "io.dropwizard:dropwizard-core:0.7.1"
compile "com.codahale.metrics:metrics-healthchecks:3.0.2"
testCompile "org.spockframework:spock-core:0.7-groovy-2.0"
}
task sourcesJar(type: Jar, dependsOn: classes) {
from sourceSets.main.allSource
classifier "sources"
extension "jar"
}
task javadocJar(type: Jar, dependsOn: javadoc) {
from javadoc.destinationDir
classifier "javadoc"
extension "jar"
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
artifact sourcesJar {
classifier "sources"
}
artifact javadocJar {
classifier "javadoc"
}
pom.withXml {
asNode().dependencies.'*'.findAll() {
it.scope.text() == 'runtime' && project.configurations.compile.allDependencies.find { dep ->
dep.name == it.artifactId.text()
}
}.each() {
it.scope*.value = 'compile'
}
}
}
}
}
group = "com.commercehub.dropwizard"
sourceCompatibility = "1.7"
apply plugin: "release"
apply plugin: "com.jfrog.bintray"
bintray {
user = project.hasProperty("bintrayUserName") ? bintrayUserName : null
key = project.hasProperty("bintrayApiKey") ? bintrayApiKey : null
publications = ["mavenJava"]
pkg {
repo = "main"
userOrg = "commercehub-oss"
name = "dropwizard-playdead"
desc = "A bundle for Dropwizard to expose new 'ping' URL that can be set to return a negative response."
licenses = ['Apache-2.0']
labels = ["dropwizard"]
}
}
bintrayUpload.dependsOn build, sourcesJar, javadocJar
createReleaseTag.dependsOn bintrayUpload