-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
83 lines (68 loc) · 2.21 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
buildscript {
repositories {
jcenter()
}
dependencies {
classpath "net.researchgate:gradle-release:2.0.2"
classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:1.1"
}
}
apply plugin: "net.researchgate.release"
subprojects {
repositories {
jcenter()
}
apply plugin: "java"
apply plugin: "maven"
apply plugin: "maven-publish"
sourceCompatibility = "1.7"
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"
}
group = "com.commercehub"
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'
}
}
}
}
}
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"
websiteUrl = "https://github.com/commercehub-oss/logstash-support"
issueTrackerUrl = "https://github.com/commercehub-oss/logstash-support/issues"
vcsUrl = "https://github.com/commercehub-oss/logstash-support.git"
licenses = ['Apache-2.0']
}
}
bintrayUpload.dependsOn build, sourcesJar, javadocJar
createReleaseTag.dependsOn bintrayUpload
}