Skip to content
This repository was archived by the owner on Feb 23, 2023. It is now read-only.

Commit 5b6fa3c

Browse files
committed
Polish
Fixes gh-1466
1 parent 23b78bc commit 5b6fa3c

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

spring-aot-gradle-plugin/src/main/java/org/springframework/aot/gradle/SpringAotGradlePlugin.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -135,12 +135,10 @@ public void apply(final Project project) {
135135
project.getPlugins().withType(SpringBootPlugin.class, springBootPlugin -> {
136136
Provider<RegularFile> generatedSources = generatedSourcesJar.getArchiveFile();
137137
project.getTasks().named(SpringBootPlugin.BOOT_JAR_TASK_NAME, BootJar.class, (bootJar) -> {
138-
FileCollection existingClasspath = bootJar.getClasspath();
139-
bootJar.setClasspath(bootJar.getProject().files(generatedSources, new Object[]{existingClasspath != null ? existingClasspath : Collections.emptyList()}));
138+
bootJar.setClasspath(project.files(generatedSources).plus(bootJar.getClasspath()));
140139
});
141140
project.getTasks().named("bootRun", BootRun.class, (bootRun) -> {
142-
FileCollection existingClasspath = bootRun.getClasspath();
143-
bootRun.setClasspath(bootRun.getProject().files(generatedSources, new Object[]{existingClasspath != null ? existingClasspath : Collections.emptyList()}));
141+
bootRun.setClasspath(project.files(generatedSources).plus(bootRun.getClasspath()));
144142
});
145143
});
146144

0 commit comments

Comments
 (0)