-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle.kts
59 lines (48 loc) · 1.5 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
plugins {
id ("teamcity.agent-plugin")
}
val functional by sourceSets.creating
val tool by configurations.creating
configurations["functionalImplementation"].extendsFrom(configurations["testImplementation"])
configurations["functionalRuntimeOnly"].extendsFrom(configurations["testRuntimeOnly"])
dependencies {
implementation (project(":jvm-monitor-common"))
testRuntimeOnly (libs.log4j)
"functionalImplementation" (project)
tool (project(":jvm-monitor-tool"))
}
tasks {
val toolDir = project.layout.buildDirectory.dir("tool")
register("copyTool", Copy::class) {
destinationDir = toolDir.get().asFile
from(tool)
}
val javaVersions = listOf(8, 11, 17, 18, 19, 20, 21, 22)
register("functionalTest", Test::class) {
group = "verification"
description = "Runs the functional tests."
useJUnitPlatform()
dependsOn(named("copyTool"))
testClassesDirs = functional.output.classesDirs
classpath = functional.runtimeClasspath
systemProperty ("tool.dir", toolDir.get().asFile.absolutePath)
javaVersions.forEach { version ->
val propertyName = "java${version}.home"
systemProperty(propertyName, findProperty(propertyName) ?: "")
}
}
}
teamcity {
agent {
descriptor {
pluginDeployment {
useSeparateClassloader = true
}
}
files {
into("tool") {
from(tool)
}
}
}
}