-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.gradle
More file actions
102 lines (88 loc) · 2.43 KB
/
Copy pathbuild.gradle
File metadata and controls
102 lines (88 loc) · 2.43 KB
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
plugins {
id 'java'
id 'maven-publish'
id "com.jfrog.bintray" version "1.8.1"
}
group 'com.github.jainsahab'
version '1.0.2'
repositories {
mavenCentral()
jcenter()
}
def pomConfig = {
licenses {
license {
name "The Apache Software License, Version 2.0"
url "http://www.apache.org/licenses/LICENSE-2.0.txt"
distribution "repo"
}
}
developers {
developer {
id "jainsahab"
name "Prateek Jain"
email "prateek.jain23021995@gmail.com"
}
}
scm {
url "https://github.com/jainsahab/metric-apdex"
}
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
javadoc.failOnError = false
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
artifacts {
archives sourcesJar
archives javadocJar
}
publishing {
publications {
mavenPublication(MavenPublication) {
from components.java
artifact sourcesJar {
classifier "sources"
}
artifact javadocJar {
classifier "javadoc"
}
groupId project.group
artifactId rootProject.name
version project.version
pom.withXml {
def root = asNode()
root.appendNode('description', 'An enhanced version of Gauge metrix type to support apdex calculation.')
root.appendNode('name', rootProject.name)
root.appendNode('url', 'https://github.com/jainsahab/metric-apdex')
root.children().last() + pomConfig
}
}
}
}
// https://reflectoring.io/guide-publishing-to-bintray-with-gradle/
bintray {
user = System.getProperty('bintray.user')
key = System.getProperty('bintray.key')
publications = ['mavenPublication']
pkg {
repo = rootProject.name
name = rootProject.name
userOrg = 'jainsahab'
licenses = ['Apache-2.0']
vcsUrl = 'https://github.com/jainsahab/metric-apdex'
version {
name = project.version
desc = project.version
released = new Date()
}
}
}
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.12'
compile group: 'io.dropwizard.metrics', name: 'metrics-core', version: '4.1.11'
}