How do i config jmokit javaagent in gradle-kotin-dsl.
I tried the follow example,but it doesn't work.
In file build.gradle.kts,the follow syntax to config javaagent is wrong.
tasks {
test {
jvmArgs("-javaagent:${classpath.find { it.name.contains("jmockit") }.absolutePath}");
}
}
I can't figure out how to write correctly with gradle-kotlin-dsl.
CodePudding user response:
In gradle-kotin-dsl, u can do this to config jmockit as javaagent.
tasks { test { jvmArgs("-javaagent:" configurations.testRuntimeClasspath.get().find { it.name.contains("jmockit") }?.absolutePath); } }
CodePudding user response:
In gradle-kotin-dsl, u can do this to config jmockit as javaagent.
tasks {
test {
jvmArgs("-javaagent:" configurations.testRuntimeClasspath.get().find { it.name.contains("jmockit") }?.absolutePath);
}
}