File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
buildSrc/src/main/java/org/springframework/boot/build/autoconfigure Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2019-2020 the original author or authors.
2
+ * Copyright 2019-2021 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
@@ -66,8 +66,10 @@ public void apply(Project project) {
66
66
.add (project .getDependencies ().project (Collections .singletonMap ("path" ,
67
67
":spring-boot-project:spring-boot-tools:spring-boot-configuration-processor" )));
68
68
project .getTasks ().create ("autoConfigurationMetadata" , AutoConfigurationMetadata .class , (task ) -> {
69
- task .setSourceSet (project .getConvention ().getPlugin (JavaPluginConvention .class ).getSourceSets ()
70
- .getByName (SourceSet .MAIN_SOURCE_SET_NAME ));
69
+ SourceSet main = project .getConvention ().getPlugin (JavaPluginConvention .class ).getSourceSets ()
70
+ .getByName (SourceSet .MAIN_SOURCE_SET_NAME );
71
+ task .setSourceSet (main );
72
+ task .dependsOn (main .getClassesTaskName ());
71
73
task .setOutputFile (new File (project .getBuildDir (), "auto-configuration-metadata.properties" ));
72
74
project .getArtifacts ().add (AutoConfigurationPlugin .AUTO_CONFIGURATION_METADATA_CONFIGURATION_NAME ,
73
75
project .provider ((Callable <File >) task ::getOutputFile ), (artifact ) -> artifact .builtBy (task ));
You can’t perform that action at this time.
0 commit comments