From dcb42c36f9a3e509772467f330bd92f336c4ef6d Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Wed, 28 Oct 2020 20:18:36 +0000 Subject: [PATCH] Ensure that additional metadata is available to annotation processor Fixes gh-23934 --- .../context/properties/ConfigurationPropertiesPlugin.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/buildSrc/src/main/java/org/springframework/boot/build/context/properties/ConfigurationPropertiesPlugin.java b/buildSrc/src/main/java/org/springframework/boot/build/context/properties/ConfigurationPropertiesPlugin.java index 81f51281fb..9c0e52f5b7 100644 --- a/buildSrc/src/main/java/org/springframework/boot/build/context/properties/ConfigurationPropertiesPlugin.java +++ b/buildSrc/src/main/java/org/springframework/boot/build/context/properties/ConfigurationPropertiesPlugin.java @@ -23,6 +23,7 @@ import java.util.stream.Collectors; import org.gradle.api.Plugin; import org.gradle.api.Project; +import org.gradle.api.Task; import org.gradle.api.artifacts.Configuration; import org.gradle.api.plugins.JavaPlugin; import org.gradle.api.plugins.JavaPluginConvention; @@ -37,7 +38,10 @@ import org.springframework.util.StringUtils; * * @@ -83,6 +87,7 @@ public class ConfigurationPropertiesPlugin implements Plugin { private void configureAdditionalMetadataLocationsCompilerArgument(Project project) { JavaCompile compileJava = project.getTasks().withType(JavaCompile.class) .getByName(JavaPlugin.COMPILE_JAVA_TASK_NAME); + ((Task) compileJava).getInputs().files(project.getTasks().getByName(JavaPlugin.PROCESS_RESOURCES_TASK_NAME)); SourceSet mainSourceSet = project.getConvention().getPlugin(JavaPluginConvention.class).getSourceSets() .getByName(SourceSet.MAIN_SOURCE_SET_NAME); compileJava.getOptions().getCompilerArgs()