forked from mderevyankoaqa/jmeter-influxdb2-listener-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
157 lines (132 loc) · 4.79 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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
plugins {
id 'com.github.johnrengelman.shadow' version "7.1.2"
id 'java'
id 'java-library'
id 'project-report'
id 'maven-publish'
id 'idea'
id 'signing'
}
java {
withJavadocJar()
withSourcesJar()
}
repositories {
mavenCentral()
{
mavenCentral()
}
}
sourceCompatibility = 11
group = 'io.github.mderevyankoaqa'
version = '2.1'
def title = 'JMeterInfluxDB2Listener'
def archiveName = 'jmeter-plugins-influxdb2-listener'
// There's a bug in JMeter leaving extra metadata right now. This is a workaround.
class JMeterRule implements ComponentMetadataRule {
void execute(ComponentMetadataContext context) {
context.details.allVariants {
withDependencies {
removeAll { it.group == "org.apache.jmeter" && it.name == "bom" }
}
}
}
}
dependencies {
implementation group: 'org.apache.jmeter', name: 'ApacheJMeter_core', version: '5.4.3'
implementation group: 'org.apache.jmeter', name: 'ApacheJMeter_java', version: '5.4.3'
implementation group: 'org.apache.jmeter', name: 'ApacheJMeter_components', version: '5.4.3'
implementation group: 'org.apache.jmeter', name: 'jorphan', version: '5.4.3'
implementation group: 'com.influxdb', name: 'influxdb-client-java', version: '6.1.0'
implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.12.0'
components {
withModule("org.apache.jmeter:ApacheJMeter_core", JMeterRule)
withModule("org.apache.jmeter:ApacheJMeter_java", JMeterRule)
withModule("org.apache.jmeter:ApacheJMeter_components", JMeterRule)
withModule("org.apache.jmeter:jorphan", JMeterRule)
withModule("org.apache.jmeter:ApacheJMeter", JMeterRule)
}
}
jar {
manifest {
attributes 'Implementation-Title': title,
'Implementation-Version': archiveVersion,
'Main-Class': 'io.github.mderevyankoaqa.influxdb2.visualizer.JMeterInfluxDBBackendListenerClient'
}
// Sets Classifier as sources.
archiveClassifier.set("sources")
}
shadowJar {
// Removes of the useless links.
minimize()
// Fix of the Class path contains multiple SLF4J bindings.
minimize
{
exclude(dependency('org.slf4j:.*:.*'))
}
archiveBaseName.set(archiveName)
manifest {
inheritFrom project.tasks.jar.manifest
}
// Removes the 'All' in Classifier to have downloadable artifact by default.
archiveClassifier.set(null)
}
publishing {
publications {
mavenJava(MavenPublication) {
groupId = 'io.github.mderevyankoaqa'
artifactId = archiveName
version = version
from components.java
versionMapping {
usage('java-api') {
fromResolutionOf('runtimeClasspath')
}
usage('java-runtime') {
fromResolutionResult()
}
}
pom {
name = archiveName
description = 'Influx DB v2.0 listener plugin for Apache JMeter. Provides the possibility to see the online dashboard (aggregation table, errors, the response body of failures).'
url = 'https://github.com/mderevyankoaqa/jmeter-influxdb2-listener-plugin'
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id = 'mderevyanko'
name = 'Mike Derevianko'
email = '[email protected]'
}
}
scm {
connection = 'scm:git:git:github.com/mderevyankoaqa/jmeter-influxdb2-listener-plugin.git'
developerConnection = 'scm:git:ssh://github.com/mderevyankoaqa/jmeter-influxdb2-listener-plugin.git'
url = 'https://github.com/mderevyankoaqa/jmeter-influxdb2-listener-plugin'
}
}
}
}
repositories {
maven {
name = "OSSRH"
url = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
credentials {
username = project.properties["ossrhUsername"]
password = project.properties["ossrhPassword"]
}
}
}
}
signing {
sign publishing.publications.mavenJava
}
javadoc {
if(JavaVersion.current().isJava9Compatible()) {
options.addBooleanOption('html5', true)
}
}