title: Get project name of task in gradle
body: <p>I have a multi-project build. Sub-projects are in tree structure (not flat). 
  In root build.gradle file I have a method that does some common thing for compilation phase. </p>
  
  <p>I would like to have separate target dir for each subproject. So when I'm compiling whole project I will have own artifacts for each subproject.
  Method I mentioned above does compilation, so it needs to know which project it compiles.</p>
  
  <p>If I use "gradle :subproject1:subsubproject1:compile" command then project.name still contains root project name. But I need in runtime to know project of task that called for method.</p>
  
  <p>Questions are:</p>
  
  <ol>
  <li>Is it good idea at all to have separate targets for subprojects?</li>
  <li>How can I understand project of task that called for method inside this method?</li>
  </ol>