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 25
25
import org .gradle .api .tasks .testing .junitplatform .JUnitPlatformOptions ;
26
26
import org .gradle .testretry .TestRetryPlugin ;
27
27
import org .gradle .testretry .TestRetryTaskExtension ;
28
+ import org .jetbrains .kotlin .gradle .targets .jvm .tasks .KotlinJvmTest ;
28
29
29
30
import java .util .Map ;
30
31
@@ -89,6 +90,11 @@ private void configureMockitoAgent(Project project) {
89
90
mockitoAgentConfig .getDependencies ().add (mockitoCore );
90
91
project .afterEvaluate (p -> {
91
92
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
+ });
92
98
});
93
99
}
94
100
}
You can’t perform that action at this time.
0 commit comments