title: How to Execute a sub task code , when whole code is gradle based
body: <p>I have a java project which uses gradle as built tool. There is a small sub task which does not need whole project build and is independent of whole project.
  It has a separate main class with <code>main</code> method. </p>
  
  <p>Although this code too needs to get its dependencies from the common project's build.gradle. </p>
  
  <p>The main project build and run is there in place with gradle. 
  I need to give a separate single point exclusively for my "small sub task" from where people can execute my "small sub task" (like a .bat file or something similar). </p>
  
  <p>I tried writing a .bat file which tries to compile the classes of my "small sub task" but compilation fails due to dependent libs not found as those are needed to be referenced from build.gradle dependencies.</p>