diff --git a/conventions/src/main/kotlin/de.siphalor.tweed5.base-module.gradle.kts b/conventions/src/main/kotlin/de.siphalor.tweed5.base-module.gradle.kts index fb8b9eb..7002017 100644 --- a/conventions/src/main/kotlin/de.siphalor.tweed5.base-module.gradle.kts +++ b/conventions/src/main/kotlin/de.siphalor.tweed5.base-module.gradle.kts @@ -54,11 +54,14 @@ tasks.compileTestJava { } tasks.test { + val testAgentFiles = testAgentClasspath.map { it.files } + doFirst { + jvmArgs(testAgentFiles.get().map { file -> "-javaagent:${file.absolutePath}" }) + } dependsOn(testAgentClasspath) finalizedBy(tasks.jacocoTestReport) useJUnitPlatform() - jvmArgs(testAgentClasspath.get().files.map { file -> "-javaagent:${file.absolutePath}" }) systemProperties( "junit.jupiter.execution.timeout.mode" to "disabled_on_debug", "junit.jupiter.execution.timeout.testable.method.default" to "10s",