-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.gradle.kts
35 lines (29 loc) · 1.47 KB
/
build.gradle.kts
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
plugins {
java
}
repositories {
mavenCentral()
}
val slf4jVersion = "1.7.36" // Make sure to use the version that is bundled with JMeter! https://github.com/apache/jmeter/blob/9f803e313abfef04516bd7b4c1e50f85b619f4f3/src/bom-thirdparty/build.gradle.kts#L139
val jmeterVersion =
"5.6.1" // releases: https://jmeter.apache.org/changes_history.html AND https://github.com/apache/jmeter/releases
dependencies {
/*
Specify the JMeter dependencies as `compileOnly`. These dependencies *do not* need to be included in the
distribution because they are already bundled in JMeter itself. So, they are needed only as compile-time
dependencies. SLF4J is also bundled in JMeter.
To see the versions of dependencies that are bundled in JMeter, refer to the gradle.properties file in the JMeter project, like this https://github.com/apache/jmeter/blob/rel/v5.4.1/gradle.properties#L122
*/
compileOnly("org.apache.jmeter:ApacheJMeter_java:$jmeterVersion")
compileOnly("org.slf4j:slf4j-api:$slf4jVersion")
}
configurations.all {
exclude(
group = "org.apache.jmeter",
module = "bom"
) // Exclude the JMeter "bom" dependency (Bill of Materials) because it doesn't actually exist. See https://bz.apache.org/bugzilla/show_bug.cgi?id=64465 and https://discuss.gradle.org/t/opt-out-of-gradle-module-metadata-for-a-specific-dependency/37051/2
}
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}