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
pull/5498/merge
Andy Wilkinson 9 years ago
parent fc463afb89
commit 7db9280bf3

@ -266,12 +266,12 @@ public class SpringBootPluginExtension {
}
public void buildInfo(Closure<?> taskConfigurer) {
BuildInfo buildInfo = this.project.getTasks().create("buildInfo",
BuildInfo bootBuildInfo = this.project.getTasks().create("bootBuildInfo",
BuildInfo.class);
this.project.getTasks().getByName(JavaPlugin.CLASSES_TASK_NAME)
.dependsOn(buildInfo);
.dependsOn(bootBuildInfo);
if (taskConfigurer != null) {
taskConfigurer.setDelegate(buildInfo);
taskConfigurer.setDelegate(bootBuildInfo);
taskConfigurer.call();
}
}

Loading…
Cancel
Save