title: What is the purpose of gradle's buildSrc folder?
body: <p>In gradle, what is the purpose of using a <code>buildSrc</code> file as a top level, as opposed to just a typical java project layout (src/main/java)?</p>
  
  <p>If I have a layout of</p>
  
  <pre><code>src
     main
        java
  </code></pre>
  
  <p>or</p>
  
  <pre><code>buildSrc
      src
         main
            java
  </code></pre>
  
  <p>What would be the difference (or the reason for doing this)? Is it more useful in multi module projects? Even for a multi module project, couldn't I do something like</p>
  
  <pre><code>proj1
    src
  
  
  proj2
    src
  </code></pre>
  
  <p>And then just have a top level build.gradle (at the same level as <code>proj1</code> and <code>proj2</code>) that defines common settings across the projects?</p>