title: How to execute a gradle task at the end of the task graph?
body: <p>How do I execute a task at the end of the task graph.</p>
  
  <p>The task</p>
  
  <pre><code>task lastTask{
          //do something
  }
  </code></pre>
  
  <p>should be executed at the end of the task graph.</p>
  
  <p>Is it enough to do the following?</p>
  
  <pre><code>project.taskgraph.whenReady{
      lastTask
  }
  </code></pre>