-
Notifications
You must be signed in to change notification settings - Fork 27
/
build.gradle
115 lines (98 loc) · 3.62 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
apply plugin: 'groovy'
apply plugin: 'idea'
apply plugin: 'signing'
group = 'com.github.kulya'
archivesBaseName = 'jmeter-gradle-plugin'
/**
* Currently supports JMeter versions 2.9, 2.10, 2.11, 2.12, 2.13
*/
ext.jmeterVersion = "2.13"
version = "1.3.3-$jmeterVersion-SNAPSHOT"
sourceCompatibility=JavaVersion.VERSION_1_6
targetCompatibility=JavaVersion.VERSION_1_6
def bootClasspathStr = "${System.env.'JAVA_HOME'}/jre/lib/rt.jar"
project.tasks.withType(AbstractCompile, { AbstractCompile ac ->
ac.options.bootClasspath = bootClasspathStr // options is always there but not defined on AbstractCompile so going to hit it anyway
})
repositories {
mavenCentral()
}
task wrapper(type: Wrapper) {
gradleVersion = '2.3'
}
configurations {
//workaround for jmeter defect 57555 (https://bz.apache.org/bugzilla/show_bug.cgi?id=57555)
if (jmeterVersion == '2.12'){
compile.exclude group: 'excalibur-fortress', module: 'excalibur-fortress-container-api'
compile.exclude group: 'excalibur-fortress', module: 'excalibur-fortress-meta'
}
//workaround for jmeter defect 57748 (https://bz.apache.org/bugzilla/show_bug.cgi?id=57748)
if (jmeterVersion == '2.13'){
compile.exclude group: 'commons-math3', module: 'commons-math3'
compile.exclude group: 'commons-pool2', module: 'commons-pool2'
}
}
dependencies {
//common to all supported versions
compile gradleApi(),
localGroovy(),
"org.apache.ant:ant:1.8.4",
"org.beanshell:bsh-core:2.0b4",
"org.apache.jmeter:ApacheJMeter_http:${jmeterVersion}",
"org.apache.jmeter:ApacheJMeter_junit:${jmeterVersion}",
"org.apache.jmeter:ApacheJMeter_java:${jmeterVersion}",
"org.apache.jmeter:ApacheJMeter_jdbc:${jmeterVersion}",
"org.apache.jmeter:ApacheJMeter_tcp:${jmeterVersion}",
"org.apache.jmeter:ApacheJMeter_mail:${jmeterVersion}",
"org.apache.jmeter:ApacheJMeter_ldap:${jmeterVersion}",
"org.apache.jmeter:ApacheJMeter_ftp:${jmeterVersion}",
"org.apache.jmeter:ApacheJMeter_functions:${jmeterVersion}",
"org.apache.jmeter:ApacheJMeter_monitors:${jmeterVersion}",
"org.apache.jmeter:ApacheJMeter_jms:${jmeterVersion}",
"org.apache.jmeter:ApacheJMeter:${jmeterVersion}",
"org.apache.jmeter:ApacheJMeter_components:${jmeterVersion}",
"org.apache.jmeter:ApacheJMeter_config:${jmeterVersion}",
"org.apache.jmeter:ApacheJMeter_core:${jmeterVersion}",
"org.apache.jmeter:ApacheJMeter_junit:${jmeterVersion}"
//version specific dependencies
if (jmeterVersion > '2.7') {
compile "org.apache.jmeter:ApacheJMeter_native:${jmeterVersion}"
}
if (jmeterVersion > '2.9'){
compile "org.apache.jmeter:ApacheJMeter_mongodb:${jmeterVersion}"
}
if (jmeterVersion < '2.13'){
compile "org.apache.jmeter:ApacheJMeter_report:${jmeterVersion}"
}
if (jmeterVersion > '2.9'){
compile "org.apache.jmeter:ApacheJMeter_components:${jmeterVersion}",
"org.apache.jmeter:ApacheJMeter_config:${jmeterVersion}",
"org.apache.jmeter:ApacheJMeter_junit-test:${jmeterVersion}",
"org.apache.jmeter:ApacheJMeter_mongodb:${jmeterVersion}"
}
if (jmeterVersion == '2.13'){
compile "org.apache.commons:commons-math3:3.4.1",
"org.apache.commons:commons-pool2:2.3"
}
testCompile "junit:junit:4.11"
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from 'build/docs/javadoc'
}
task sourcesJar(type: Jar) {
from sourceSets.main.allSource
classifier = 'sources'
}
artifacts {
archives jar
archives sourcesJar
archives javadocJar
}
processResources.doLast {
ant.replace(
file: "${project.buildDir}/resources/main/jmeter-plugin.properties",
token: "@jmeter.version@",
value: "$jmeterVersion"
)
}