title: How to get source code directory in Gradle plugin?
body: <p>I want to get the directory of Java files in a Groovy plugin.</p>
  
  <p>For example, I have a Java file in a directory:</p>
  
  <pre><code>"/gradleProject/src/main/java/com/file.java"
  </code></pre>
  
  <p>How can I get:</p>
  
  <pre><code>"src/main/java"
  </code></pre>
  
  <p>In Maven there is <code>Build.getSourceDirectory()</code>, what is the equivalent in Gradle?</p>