Commit 7db9280b authored by Andy Wilkinson's avatar Andy Wilkinson

Rename the default BuildInfo task to bootBuildInfo

Previously, the default BuildInfo task created by the DSL was called
buildInfo. Due to Gradle's lack of namespacing for tasks, this meant
there was a slight risk that it could clash with another task. It
also didn't following the naming used by Boot's run task which is
named bootRun.

This commit renames the default BuildInfo task to bootBuildInfo to
match bootRun and to hopefully avoid clashes with tasks from other
plugins.

Closes gh-5518
parent fc463afb
...@@ -266,12 +266,12 @@ public class SpringBootPluginExtension { ...@@ -266,12 +266,12 @@ public class SpringBootPluginExtension {
} }
public void buildInfo(Closure<?> taskConfigurer) { public void buildInfo(Closure<?> taskConfigurer) {
BuildInfo buildInfo = this.project.getTasks().create("buildInfo", BuildInfo bootBuildInfo = this.project.getTasks().create("bootBuildInfo",
BuildInfo.class); BuildInfo.class);
this.project.getTasks().getByName(JavaPlugin.CLASSES_TASK_NAME) this.project.getTasks().getByName(JavaPlugin.CLASSES_TASK_NAME)
.dependsOn(buildInfo); .dependsOn(bootBuildInfo);
if (taskConfigurer != null) { if (taskConfigurer != null) {
taskConfigurer.setDelegate(buildInfo); taskConfigurer.setDelegate(bootBuildInfo);
taskConfigurer.call(); taskConfigurer.call();
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment