This repository was archived by the owner on Jun 20, 2020. It is now read-only.
forked from davidB/metrics-influxdb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
88 lines (79 loc) · 2.12 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
plugins {
id "java"
id "maven-publish"
id "nebula.provided-base" version "2.2.2"
}
group = "com.recursionpharma"
def description = "A reporter for metrics 2 which announces measurements to an InfluxDB server. Forked from davidB/metrics-influxdb and ported to metrics 2"
version = "git describe --always --dirty".execute().text.trim()
println("version : '${version}'")
repositories {
jcenter()
}
dependencies {
provided 'com.yammer.metrics:metrics-core:2.2.0'
compile 'org.slf4j:slf4j-api:1.7.7'
testCompile 'junit:junit:4.4'
testCompile 'org.testng:testng:6.9.10'
testCompile 'org.hamcrest:hamcrest-all:1.3'
testCompile 'org.easytesting:fest-assert-core:2.0M10'
testCompile 'org.mockito:mockito-all:1.9.5'
testCompile 'org.slf4j:slf4j-simple:1.7.7'
testCompile 'com.google.guava:guava:19.0'
}
sourceCompatibility = JavaVersion.VERSION_1_7
targetCompatibility = JavaVersion.VERSION_1_7
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
test {
// enable TestNG support (default is JUnit)
useTestNG()
}
task sourcesJar(type: Jar) {
from sourceSets.main.allSource
classifier = 'sources'
}
task javadocJar(type: Jar, dependsOn: javadoc) {
from javadoc.destinationDir
classifier = 'javadoc'
}
// add javadoc/source jar tasks as artifacts
artifacts {
archives sourcesJar, javadocJar
}
def pomConfig = {
name "metrics2-influxdb"
url "https://github.com/recursionpharma/metrics-influxdb"
inceptionYear "2017"
licenses {
license {
name "Public domain (CC0-1.0)"
url "http://creativecommons.org/publicdomain/zero/1.0/"
distribution "repo"
}
}
scm {
connection "scm:git:git://github.com/recursionpharma/metrics-influxdb.git"
developerConnection "scm:git:[email protected]:recursionpharma/metrics-influxdb.git"
url "https://github.com/recursionpharma/metrics-influxdb/"
}
developers {
developer {
id "scizo"
name "Scott Nielsen"
}
}
}
publishing {
publications {
mavenStuff(MavenPublication) {
from components.java
artifact sourcesJar
artifact javadocJar
pom.withXml {
def root = asNode()
root.appendNode('description', description)
root.children().last() + pomConfig
}
}
}
}