Skip to content

Commit 9cd15a1

Browse files
committed
Merge branch '2.3.x' into 2.4.x
Closes gh-26276
2 parents 05b0990 + 79ecf59 commit 9cd15a1

File tree

6 files changed

+25
-14
lines changed

6 files changed

+25
-14
lines changed

buildSrc/src/main/java/org/springframework/boot/build/AsciidoctorConventions.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2019-2020 the original author or authors.
2+
* Copyright 2019-2021 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -34,6 +34,7 @@
3434
import org.gradle.api.file.FileCollection;
3535
import org.gradle.api.tasks.InputFiles;
3636
import org.gradle.api.tasks.OutputDirectory;
37+
import org.gradle.api.tasks.PathSensitivity;
3738
import org.gradle.api.tasks.Sync;
3839
import org.gradle.api.tasks.TaskAction;
3940

@@ -136,7 +137,8 @@ private Sync createSyncDocumentationSourceTask(Project project, AbstractAsciidoc
136137
syncDocumentationSource.setDestinationDir(syncedSource);
137138
syncDocumentationSource.from("src/docs/");
138139
asciidoctorTask.dependsOn(syncDocumentationSource);
139-
asciidoctorTask.getInputs().dir(syncedSource);
140+
asciidoctorTask.getInputs().dir(syncedSource).withPathSensitivity(PathSensitivity.RELATIVE)
141+
.withPropertyName("synced source");
140142
asciidoctorTask.setSourceDir(project.relativePath(new File(syncedSource, "asciidoc/")));
141143
return syncDocumentationSource;
142144
}

buildSrc/src/main/java/org/springframework/boot/build/autoconfigure/AutoConfigurationMetadata.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
import org.gradle.api.DefaultTask;
3232
import org.gradle.api.Task;
3333
import org.gradle.api.tasks.OutputFile;
34+
import org.gradle.api.tasks.PathSensitivity;
3435
import org.gradle.api.tasks.SourceSet;
3536
import org.gradle.api.tasks.TaskAction;
3637

@@ -52,8 +53,10 @@ public class AutoConfigurationMetadata extends DefaultTask {
5253
private File outputFile;
5354

5455
public AutoConfigurationMetadata() {
55-
getInputs().file((Callable<File>) () -> new File(this.sourceSet.getOutput().getResourcesDir(),
56-
"META-INF/spring.factories"));
56+
getInputs()
57+
.file((Callable<File>) () -> new File(this.sourceSet.getOutput().getResourcesDir(),
58+
"META-INF/spring.factories"))
59+
.withPathSensitivity(PathSensitivity.RELATIVE).withPropertyName("spring.factories");
5760
dependsOn((Callable<String>) () -> this.sourceSet.getProcessResourcesTaskName());
5861
getProject().getConfigurations()
5962
.maybeCreate(AutoConfigurationPlugin.AUTO_CONFIGURATION_METADATA_CONFIGURATION_NAME);

buildSrc/src/main/java/org/springframework/boot/build/context/properties/ConfigurationPropertiesPlugin.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2020 the original author or authors.
2+
* Copyright 2012-2021 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -27,6 +27,7 @@
2727
import org.gradle.api.artifacts.Configuration;
2828
import org.gradle.api.plugins.JavaPlugin;
2929
import org.gradle.api.plugins.JavaPluginConvention;
30+
import org.gradle.api.tasks.PathSensitivity;
3031
import org.gradle.api.tasks.SourceSet;
3132
import org.gradle.api.tasks.compile.JavaCompile;
3233

@@ -87,7 +88,8 @@ private void addMetadataArtifact(Project project) {
8788
private void configureAdditionalMetadataLocationsCompilerArgument(Project project) {
8889
JavaCompile compileJava = project.getTasks().withType(JavaCompile.class)
8990
.getByName(JavaPlugin.COMPILE_JAVA_TASK_NAME);
90-
((Task) compileJava).getInputs().files(project.getTasks().getByName(JavaPlugin.PROCESS_RESOURCES_TASK_NAME));
91+
((Task) compileJava).getInputs().files(project.getTasks().getByName(JavaPlugin.PROCESS_RESOURCES_TASK_NAME))
92+
.withPathSensitivity(PathSensitivity.RELATIVE).withPropertyName("processed resources");
9193
SourceSet mainSourceSet = project.getConvention().getPlugin(JavaPluginConvention.class).getSourceSets()
9294
.getByName(SourceSet.MAIN_SOURCE_SET_NAME);
9395
compileJava.getOptions().getCompilerArgs()

buildSrc/src/main/java/org/springframework/boot/build/mavenplugin/MavenExec.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2020 the original author or authors.
2+
* Copyright 2012-2021 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -51,7 +51,8 @@ public MavenExec() throws IOException {
5151

5252
public void setProjectDir(File projectDir) {
5353
this.projectDir = projectDir;
54-
getInputs().file(new File(projectDir, "pom.xml")).withPathSensitivity(PathSensitivity.RELATIVE);
54+
getInputs().file(new File(projectDir, "pom.xml")).withPathSensitivity(PathSensitivity.RELATIVE)
55+
.withPropertyName("pom");
5556
}
5657

5758
@Override

buildSrc/src/main/java/org/springframework/boot/build/mavenplugin/MavenPluginPlugin.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2019-2020 the original author or authors.
2+
* Copyright 2019-2021 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -50,6 +50,7 @@
5050
import org.gradle.api.tasks.Copy;
5151
import org.gradle.api.tasks.JavaExec;
5252
import org.gradle.api.tasks.OutputDirectory;
53+
import org.gradle.api.tasks.PathSensitivity;
5354
import org.gradle.api.tasks.SourceSet;
5455
import org.gradle.api.tasks.SourceSetContainer;
5556
import org.gradle.api.tasks.TaskAction;
@@ -211,7 +212,8 @@ private MavenExec createGeneratePluginDescriptorTask(Project project, File maven
211212
MavenExec generatePluginDescriptor = project.getTasks().create("generatePluginDescriptor", MavenExec.class);
212213
generatePluginDescriptor.args("org.apache.maven.plugins:maven-plugin-plugin:3.6.0:descriptor");
213214
generatePluginDescriptor.getOutputs().dir(new File(mavenDir, "target/classes/META-INF/maven"));
214-
generatePluginDescriptor.getInputs().dir(new File(mavenDir, "target/classes/org"));
215+
generatePluginDescriptor.getInputs().dir(new File(mavenDir, "target/classes/org"))
216+
.withPathSensitivity(PathSensitivity.RELATIVE).withPropertyName("plugin classes");
215217
generatePluginDescriptor.setProjectDir(mavenDir);
216218
return generatePluginDescriptor;
217219
}
@@ -243,7 +245,8 @@ public static class FormatHelpMojoSourceTask extends DefaultTask {
243245

244246
void setGenerator(Task generator) {
245247
this.generator = generator;
246-
getInputs().files(this.generator);
248+
getInputs().files(this.generator).withPathSensitivity(PathSensitivity.RELATIVE)
249+
.withPropertyName("generated source");
247250
}
248251

249252
@OutputDirectory

buildSrc/src/main/java/org/springframework/boot/build/test/autoconfigure/TestSliceMetadata.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2020 the original author or authors.
2+
* Copyright 2012-2021 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -64,9 +64,9 @@ public class TestSliceMetadata extends DefaultTask {
6464

6565
public TestSliceMetadata() {
6666
getInputs().dir((Callable<File>) () -> this.sourceSet.getOutput().getResourcesDir())
67-
.withPathSensitivity(PathSensitivity.RELATIVE);
67+
.withPathSensitivity(PathSensitivity.RELATIVE).withPropertyName("resources");
6868
getInputs().files((Callable<FileCollection>) () -> this.sourceSet.getOutput().getClassesDirs())
69-
.withPathSensitivity(PathSensitivity.RELATIVE);
69+
.withPathSensitivity(PathSensitivity.RELATIVE).withPropertyName("classes");
7070
}
7171

7272
public void setSourceSet(SourceSet sourceSet) {

0 commit comments

Comments
 (0)