title: How to run a single gradle task from command line
body: <p>In my project I have several tasks in my build.gradle. I want those tasks to be independent while running. ie I need to run a single task from command line. But the command "gradle taskA" will run both taskA and taskB which I do not want. How to prevent a task being running?. </p>
  
  <p>Here's a sample of what I am doing.</p>
  
  <pre><code>   task runsSQL{
      description 'run sql queries'
      apply plugin: 'java'
      apply plugin: 'groovy'
  
      print 'Run SQL'  }
  
  task runSchema{
      apply plugin: 'java'
      apply plugin: 'groovy'
  
      print 'Run Schema' }
  </code></pre>
  
  <p>Here's the output I'm getting.
  <img src="https://i.stack.imgur.com/xt0Aj.png" alt="enter image description here"></p>