Skip to content

Commit cfac7f5

Browse files
committed
Correct annotations on BootBuildImage's file-based inputs
Closes spring-projectsgh-32495
1 parent 33afbcc commit cfac7f5

File tree

1 file changed

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

1 file changed

+7
-2
lines changed

spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/bundling/BootBuildImage.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,11 @@
3232
import org.gradle.api.provider.ListProperty;
3333
import org.gradle.api.provider.Property;
3434
import org.gradle.api.tasks.Input;
35+
import org.gradle.api.tasks.InputFile;
3536
import org.gradle.api.tasks.Nested;
3637
import org.gradle.api.tasks.Optional;
38+
import org.gradle.api.tasks.PathSensitive;
39+
import org.gradle.api.tasks.PathSensitivity;
3740
import org.gradle.api.tasks.TaskAction;
3841
import org.gradle.api.tasks.options.Option;
3942
import org.gradle.work.DisableCachingByDefault;
@@ -121,7 +124,8 @@ public BootBuildImage() {
121124
* Returns the property for the archive file from which the image will be built.
122125
* @return the archive file property
123126
*/
124-
@Input
127+
@InputFile
128+
@PathSensitive(PathSensitivity.RELATIVE)
125129
public RegularFileProperty getArchiveFile() {
126130
return this.archiveFile;
127131
}
@@ -132,7 +136,8 @@ public RegularFileProperty getArchiveFile() {
132136
* @deprecated since 2.5.0 for removal in 2.7.0 in favor of {@link #getArchiveFile()}
133137
*/
134138
@Deprecated
135-
@Input
139+
@InputFile
140+
@PathSensitive(PathSensitivity.RELATIVE)
136141
public RegularFileProperty getJar() {
137142
return this.archiveFile;
138143
}

0 commit comments

Comments
 (0)