File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
buildSrc/src/main/java/org/springframework/build Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change 2525import org .gradle .api .tasks .testing .junitplatform .JUnitPlatformOptions ;
2626import org .gradle .testretry .TestRetryPlugin ;
2727import org .gradle .testretry .TestRetryTaskExtension ;
28+ import org .jetbrains .kotlin .gradle .targets .jvm .tasks .KotlinJvmTest ;
2829
2930import java .util .Map ;
3031
@@ -89,6 +90,11 @@ private void configureMockitoAgent(Project project) {
8990 mockitoAgentConfig .getDependencies ().add (mockitoCore );
9091 project .afterEvaluate (p -> {
9192 p .getTasks ().withType (Test .class , test -> test .jvmArgs ("-javaagent:" + mockitoAgentConfig .getAsPath ()));
93+ project .getPlugins ().withId ("org.jetbrains.kotlin.jvm" , plugin -> {
94+ project .getTasks ().withType (KotlinJvmTest .class , kotlinTest -> {
95+ kotlinTest .jvmArgs ("-javaagent:" + mockitoAgentConfig .getAsPath ());
96+ });
97+ });
9298 });
9399 }
94100 }
You can’t perform that action at this time.
0 commit comments