title: Run only one task from build.gradle
body: <p>You can run only one task, from one file, with more tasks?</p>
  
  <p>I have <code>build.gradle</code> file</p>
  
  <pre class="lang-js prettyprint-override"><code>task RunA {
      println 'A'
  }
  
  task RunB{
      println 'B'
  }
  
  task RunC{
      println 'C'
  }
  
  task RunD{
      println 'D'
  }
  </code></pre>
  
  
  
  <p>And I try run only one task <code>RunB</code> from IntelliJ or Teamcity. But result is</p>
  
  <pre><code>A
  B
  C
  D
  </code></pre>
  
  <p>Why? Before, I used Ant.</p>
  
  <p>I need this result after call RunB</p>
  
  <pre><code>B
  </code></pre>
  
  <p><strong>Really "intuitive" sulution</strong></p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>task RunA {
      doLast {
          println 'A'
      }
  }
  
  task RunB {
      doLast {
          println 'B'
      }
  }
  
  task RunC {
      doLast {
          println 'C'
      }
  }
  
  task RunD {
      doLast {
          println 'D'
      }
  }</code></pre>
  </div>
  </div>
  </p>