title: buildSrc gradle folder not compiling
body: <p>My goal is to have a common class that other build files can see in gradle.  I have created a folder called buildSrc and it is in my root directory of my android project.  The contents look like this:</p>
  
  <pre><code>    class CountryFlavors {
  
      def Closure getFlavor() {
          return  callback;
      }
  
  Closure  callback ={
  
      mock {
          applicationId "ca.mysite.mock"
      }
      prod {
          applicationId "ca.mysite.prod"
  
      }
  }
  
  }
  </code></pre>
  
  <p>From the documentation it states that a class put into the folder buildSrc will automatically get put in the same classpath as my build script for android. But instead whats happening is the class cannot be found.  I tried to reference the class in build.gradle file on the app level but it cant find the class. Here is how i am calling the class CountryFlavors:</p>
  
  <pre><code>new CountryFlavors().getFlavor()
  </code></pre>
  
  <p>the compiler compains that this class cannot be found.  The class file is in buildSrc and i named it "build.gradle". i blanked out my root folder in the photo for proprietary reasons.   What am i missing ?<img src="https://i.stack.imgur.com/7HgGX.png" alt="enter image description here"></p>
  
  <p>my end goal is to have a class defined externally that can return a closure to me that i can use in my build script. @Opal</p>