Skip to content

Commit 265cfc2

Browse files
committed
Avoid eager creation of the compile*Kotlin tasks
see https://docs.gradle.org/7.4/userguide/task_configuration_avoidance.html
1 parent ffcc947 commit 265cfc2

File tree

1 file changed

+2
-2
lines changed
  • spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/plugin

1 file changed

+2
-2
lines changed

spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/plugin/KotlinPluginAction.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ private String getKotlinVersion(Project project) {
4747
}
4848

4949
private void enableJavaParametersOption(Project project) {
50-
project.getTasks().withType(KotlinCompile.class,
51-
(compile) -> compile.getKotlinOptions().setJavaParameters(true));
50+
project.getTasks().withType(KotlinCompile.class)
51+
.configureEach((compile) -> compile.getKotlinOptions().setJavaParameters(true));
5252
}
5353

5454
@Override

0 commit comments

Comments
 (0)