File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
buildSrc/src/main/java/org/springframework/boot/build/context/properties Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 2323
2424import org .gradle .api .Plugin ;
2525import org .gradle .api .Project ;
26+ import org .gradle .api .Task ;
2627import org .gradle .api .artifacts .Configuration ;
2728import org .gradle .api .plugins .JavaPlugin ;
2829import org .gradle .api .plugins .JavaPluginConvention ;
3738 *
3839 * <ul>
3940 * <li>Adding a dependency on the configuration properties annotation processor.
40- * <li>Configure the additional metadata locations annotation processor compiler argument
41+ * <li>Configuring the additional metadata locations annotation processor compiler
42+ * argument.
43+ * <li>Adding the outputs of the processResources task as inputs of the compileJava task
44+ * to ensure that the additional metadata is available when the annotation processor runs.
4145 * <li>Defining an artifact for the resulting configuration property metadata so that it
4246 * can be consumed by downstream projects.
4347 * </ul>
@@ -83,6 +87,7 @@ private void addMetadataArtifact(Project project) {
8387 private void configureAdditionalMetadataLocationsCompilerArgument (Project project ) {
8488 JavaCompile compileJava = project .getTasks ().withType (JavaCompile .class )
8589 .getByName (JavaPlugin .COMPILE_JAVA_TASK_NAME );
90+ ((Task ) compileJava ).getInputs ().files (project .getTasks ().getByName (JavaPlugin .PROCESS_RESOURCES_TASK_NAME ));
8691 SourceSet mainSourceSet = project .getConvention ().getPlugin (JavaPluginConvention .class ).getSourceSets ()
8792 .getByName (SourceSet .MAIN_SOURCE_SET_NAME );
8893 compileJava .getOptions ().getCompilerArgs ()
You can’t perform that action at this time.
0 commit comments