From cfac7f55a4aa1e55c26ce764259862169a931d2c Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Mon, 26 Sep 2022 13:13:16 +0100 Subject: [PATCH] Correct annotations on BootBuildImage's file-based inputs Closes gh-32495 --- .../boot/gradle/tasks/bundling/BootBuildImage.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/bundling/BootBuildImage.java b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/bundling/BootBuildImage.java index 22acd8b05f..6cd092ac73 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/bundling/BootBuildImage.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/bundling/BootBuildImage.java @@ -32,8 +32,11 @@ import org.gradle.api.file.RegularFileProperty; import org.gradle.api.provider.ListProperty; import org.gradle.api.provider.Property; import org.gradle.api.tasks.Input; +import org.gradle.api.tasks.InputFile; import org.gradle.api.tasks.Nested; import org.gradle.api.tasks.Optional; +import org.gradle.api.tasks.PathSensitive; +import org.gradle.api.tasks.PathSensitivity; import org.gradle.api.tasks.TaskAction; import org.gradle.api.tasks.options.Option; import org.gradle.work.DisableCachingByDefault; @@ -121,7 +124,8 @@ public class BootBuildImage extends DefaultTask { * Returns the property for the archive file from which the image will be built. * @return the archive file property */ - @Input + @InputFile + @PathSensitive(PathSensitivity.RELATIVE) public RegularFileProperty getArchiveFile() { return this.archiveFile; } @@ -132,7 +136,8 @@ public class BootBuildImage extends DefaultTask { * @deprecated since 2.5.0 for removal in 2.7.0 in favor of {@link #getArchiveFile()} */ @Deprecated - @Input + @InputFile + @PathSensitive(PathSensitivity.RELATIVE) public RegularFileProperty getJar() { return this.archiveFile; }