anchor.diff:  
   There are several ways you can define the dependencies of a task. In <<tutorial_using_tasks.adoc#sec:task_dependencies,Task dependencies>> you were introduced to defining dependencies using task names. Task names can refer to tasks in the same project as the task, or to tasks in other projects. To refer to a task in another project, you prefix the name of the task with the path of the project it belongs to. The following is an example which adds a dependency from `projectA:taskX` to `projectB:taskY`:
   
  -=== Example: Adding dependency on task from another project
  -
  -[source.multi-language-sample,groovy]
  -.build.gradle
  -----
  -include::{samplesPath}/userguide/tasks/addDependencyUsingPath/build.gradle[]
  -----
  +.Adding dependency on task from another project
  +====
  +include::sample[dir="userguide/tasks/addDependencyUsingPath",files="build.gradle[]"]
   
   .Output of **`gradle -q taskX`**
   ----
   > gradle -q taskX
   include::{samplesPath}/userguide/tasks/addDependencyUsingPath/addDependencyUsingPath.out[]
   ----
  +====
   
   Instead of using a task name, you can define a dependency using a `Task` object, as shown in this example:
   
  -=== Example: Adding dependency using task object
  -
  -[source.multi-language-sample,groovy]
  -.build.gradle
  -----
  -include::{samplesPath}/userguide/tasks/addDependencyUsingTask/build.gradle[]
  -----
  +.Adding dependency using task object
  +====
  +include::sample[dir="userguide/tasks/addDependencyUsingTask",files="build.gradle[]"]
   
   .Output of **`gradle -q taskX`**
   ----
   > gradle -q taskX
   include::{samplesPath}/userguide/tasks/addDependencyUsingTask/addDependencyUsingTask.out[]
   ----
  +====
   
   For more advanced uses, you can define a task dependency using a closure. When evaluated, the closure is passed the task whose dependencies are being calculated. The closure should return a single `Task` or collection of `Task` objects, which are then treated as dependencies of the task. The following example adds a dependency from `taskX` to all the tasks in the project whose name starts with `lib`:
   
  -=== Example: Adding dependency using closure
  -
  -[source.multi-language-sample,groovy]
  -.build.gradle
  -----
  -include::{samplesPath}/userguide/tasks/addDependencyUsingClosure/build.gradle[]
  -----
  +.Adding dependency using closure
  +====
  +include::sample[dir="userguide/tasks/addDependencyUsingClosure",files="build.gradle[]"]
   
   .Output of **`gradle -q taskX`**
   ----
   > gradle -q taskX
   include::{samplesPath}/userguide/tasks/addDependencyUsingClosure/addDependencyUsingClosure.out[]
   ----
  +====
   
   For more information about task dependencies, see the link:{groovyDslPath}/org.gradle.api.Task.html[Task] API.
   
  
positive.code: 
  That’s where the `upToDateWhen()` method on `TaskOutputs` comes in. This takes a predicate function that is used to determine whether a task is up to date or not. One use case is to disable up-to-date checks completely for a task, like so:
  
  === Example: Ignoring up-to-date checks
  
  [source.multi-language-sample,groovy]
  .build.gradle
  ----
  include::{samplesPath}/userguide/tasks/incrementalBuild/incrementalBuildAdvanced/build.gradle[tag=up-to-date-when]
  ----
  
  .Output of `gradle clean alwaysInstrumentClasses`
  ----
  
negative.code: 
  As mentioned before, the “should run after” ordering rule will be ignored if it introduces an ordering cycle:
  
  .A 'should run after' task ordering is ignored if it introduces an ordering cycle
  ====
  include::sample[dir="userguide/tasks/shouldRunAfterWithCycle",files="build.gradle[]"]
  
  .Output of **`gradle -q taskX`**
  ----
  > gradle -q taskX
  include::{samplesPath}/userguide/tasks/shouldRunAfterWithCycle/shouldRunAfterWithCycle.out[]
  ----
  ====
  
  [[sec:adding_a_description_to_a_task]]
  == Adding a description to a task
  
  You can add a description to your task. This description is displayed when executing `gradle tasks`.
  
  .Adding a description to a task
  ====
  include::sample[dir="userguide/tasks/defineAndConfigure",files="build.gradle[tags=all]"]
  ====
  
  
  [[sec:replacing_tasks]]
  