forked from anjlab/logback-hipchat-appender
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
129 lines (104 loc) · 3.33 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
apply plugin: 'java'
apply plugin: 'eclipse'
group = 'com.anjlab'
version = '1.0.1'
description = 'Logback HipChat Appender'
buildscript {
repositories {
mavenCentral()
maven { url 'http://jcenter.bintray.com' }
}
dependencies {
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:0.5'
classpath 'nl.javadude.gradle.plugins:license-gradle-plugin:0.11.0'
}
}
configure(allprojects) {
apply plugin: 'license'
apply plugin: 'maven'
apply plugin: 'maven-publish'
}
repositories {
mavenCentral()
}
dependencies {
compile 'org.apache.httpcomponents:httpclient:4.3.1'
compile 'org.slf4j:slf4j-api:1.7.7'
compile 'ch.qos.logback:logback-core:1.1.2'
compile 'ch.qos.logback:logback-classic:1.1.2'
compile 'commons-io:commons-io:2.4'
compile 'com.google.code.gson:gson:2.2.4'
runtime 'org.slf4j:jcl-over-slf4j:1.7.5'
runtime 'org.slf4j:log4j-over-slf4j:1.7.5'
testCompile 'junit:junit:4.10'
}
configurations {
all*.exclude group: 'org.slf4j', module: 'slf4j-log4j12'
all*.exclude group: 'org.slf4j', module: 'slf4j-simple'
all*.exclude group: 'log4j', module: 'log4j'
all*.exclude group: 'commons-logging', module: 'commons-logging'
}
apply plugin: 'com.jfrog.bintray'
bintray {
user = "$bintray_user"
key = "$bintray_api_key"
publications = ['mavenJava']
pkg {
repo = 'maven'
userOrg = 'anjlab' // an optional organization name when the repo belongs to one of the user's orgs
licenses = ['Apache-2.0']
}
dryRun = false // whether to run this as dry-run, without deploying
}
bintray.pkg.name = name
bintray.pkg.desc = description
bintray.pkg.labels = []
task sourcesJar(type: Jar, dependsOn: classes) {
from sourceSets.main.allSource
classifier = 'sources'
}
task javadocJar(type: Jar, dependsOn: javadoc) {
from javadoc.destinationDir
classifier = 'javadoc'
}
jar.dependsOn sourcesJar
jar.dependsOn javadocJar
artifacts {
archives sourcesJar
archives javadocJar
}
def pomFragments = {
developers {
developer {
id "dmitrygusev"
name "Dmitry Gusev"
email "dmitry@anjlab.com"
}
}
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
artifact sourcesJar
artifact javadocJar
pom.withXml {
def root = asNode()
def deps = root.children().find {
it.name().localPart == 'dependencies'
}
root.children().remove(deps)
root.appendNode('description', project.description)
def license = root.appendNode('licenses').appendNode('license')
license.appendNode("name", "The Apache Software License, Version 2.0")
license.appendNode("url", "http://www.apache.org/licenses/LICENSE-2.0.txt")
license.appendNode("distribution", "repo")
root.children().last() + pomFragments
def pom = new XmlParser().parse(project.file("build/poms/pom-default.xml"))
pom.dependencies.each {
root.append(it)
}
}
}
}
}