title: Server (os: Ubuntu) setup using gradle
body: <p>I need some applications to be installed on Ubuntu machine. scenario is as below</p>
  
  <p>1) Some applications are dependent on other application</p>
  
  <p>2) If some applications are already installed then skip it and proceed further.</p>
  
  <p>Please refer below sample gradle example,</p>
  
  <p>1) install_b is dependent on install_a.</p>
  
  <p>2) If install_a is already installed then how to skip task install_a in gradle.</p>
  
  <pre><code>task install_a(type: Exec) {
    executable "sh"
    args "-c","sudo apt-get install SOMEAPP"
  }
  
  task install_b(type: Exec) {
   dependsOn &lt;&lt; install_a
   executable "sh"
   args "-c","sudo apt-get install ANOTHERAPP"
  }
  </code></pre>