anchor.diff:  * link:{groovyDslPath}/org.gradle.api.Task.html#org.gradle.api.Task:doLast(org.gradle.api.Action)[Task.doLast{}] should be used if the task only defines a single action.
   * A task should <<#sec:improving_task_discoverability,define a group and description>>.
   
  -=== Example: Definition of tasks following best practices
  -
  -[source.multi-language-sample,groovy]
  -.build.gradle
  -----
  -include::{samplesPath}/userguide/bestPractices/taskDefinition/build.gradle[]
  -----
  +.Definition of tasks following best practices
  +====
  +include::sample[dir="userguide/bestPractices/taskDefinition", files="build.gradle[]"]
  +====
   
   [[sec:improving_task_discoverability]]
   == Improving task discoverability
  
positive.code: Let's consider the following incantation of the anti-pattern described above.
  In the build script you can see that the dependencies assigned to the configuration `printArtifactNames` are resolved outside of the task action.
  
  === Example: Executing logic during configuration should be avoided
  
  [source.multi-language-sample,groovy]
  .build.gradle
  ----
  include::{samplesPath}/userguide/bestPractices/logicDuringConfiguration/dont/build.gradle[tag=config-logic]
  ----
  
  The code for resolving the dependencies should be moved into the task action to avoid the performance impact of resolving the dependencies before they are actually needed.
  
  === Example: Executing logic during execution phase is preferred
  
  [source.multi-language-sample,groovy]
  .build.gradle
  ----
  include::{samplesPath}/userguide/bestPractices/logicDuringConfiguration/do/build.gradle[tag=config-logic]
  ----
  
  [[sec:avoiding_use_of_gradlebuild]]
  == Avoiding the use of `GradleBuild`
  
negative.code: The task should be organized underneath the bucket `Documentation`.
  The description should express its intent.
  
  .A task declaring the group and description
  ====
  include::sample[dir="userguide/bestPractices/taskGroupDescription", files="build.gradle[]"]
  ====
  
  The output of the tasks report reflects the assigned values.
  
  