This repository has been archived by the owner on Mar 23, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathbuild.gradle
111 lines (91 loc) · 3.15 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
group 'su.nlq'
version '3.6.2'
ext {
vertxVersion = '3.6.2'
prometheusVersion = '0.6.0'
}
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'signing'
apply plugin: 'jacoco'
sourceCompatibility = 1.8
repositories {
mavenCentral()
}
dependencies {
compile group: 'org.jetbrains', name: 'annotations', version: '16.0.3'
compile group: 'io.vertx', name: 'vertx-core', version: vertxVersion
compile group: 'io.vertx', name: 'vertx-web', version: vertxVersion
compile group: 'io.prometheus', name: 'simpleclient', version: prometheusVersion
compile group: 'io.prometheus', name: 'simpleclient_servlet', version: prometheusVersion
compile group: 'io.prometheus', name: 'simpleclient_common', version: prometheusVersion
compile group: 'su.nlq', name: 'prometheus-protobuf-servlet', version: prometheusVersion
testCompile group: 'junit', name: 'junit', version: '4.12'
testCompile group: 'io.vertx', name: 'vertx-unit', version: vertxVersion
}
jacocoTestReport {
reports {
xml.enabled true
html.enabled false
}
}
check.dependsOn jacocoTestReport
uploadArchives {
repositories {
mavenDeployer {
beforeDeployment { final MavenDeployment deployment -> signing.signPom(deployment) }
def user = project.hasProperty("ossrhUsername") ? ossrhUsername : ''
def password = project.hasProperty("ossrhUsername") ? ossrhPassword : ''
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
authentication(userName: user, password: password)
}
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
authentication(userName: user, password: password)
}
pom.project {
name 'Vert.x Prometheus Metrics'
description 'Prometheus implementation of the Vert.x Metrics SPI'
url 'https://github.com/nolequen/vertx-prometheus-metrics'
licenses {
license {
name "The Apache Software License, Version 2.0"
url "http://www.apache.org/licenses/LICENSE-2.0.txt"
distribution 'repo'
}
license {
name "Eclipse Public License - v 1.0"
url "http://www.eclipse.org/legal/epl-v10.html"
distribution 'repo'
}
}
scm {
url 'https://github.com/nolequen/vertx-prometheus-metrics'
connection 'scm:git:git://github.com/nolequen/vertx-prometheus-metrics.git'
developerConnection 'scm:git:ssh://github.com:nolequen/vertx-prometheus-metrics.git'
}
developers {
developer {
name "Nolequen"
email "[email protected]"
url "http://www.nlq.su/"
}
}
}
}
}
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
artifacts {
archives sourcesJar, javadocJar
}
signing {
required { gradle.taskGraph.hasTask("uploadArchives") }
sign configurations.archives
}