title: How do I import a class in gradle outside of build.gradle in a apply from: file
body: <p>I am having a wired issue I am using gradle 1.9</p>
  
  <p>I cannot seem to import a class from outside build.gradle</p>
  
  <p>The following works</p>
  
  <p>build.gradle</p>
  
  <pre><code>buildscript {
      repositories {
          mavenLocal()
      }
      dependencies {
          classpath(group: 'com.foo', name: 'gradle-local-eureka', version: '1.0-SNAPSHOT')
      }
  }
  import com.foo.my.awesome.package.AwesomeService
  </code></pre>
  
  <p>The following errors out 
  build.gradle</p>
  
  <pre><code>buildscript {
      repositories {
          mavenLocal()
      }
      dependencies {
          classpath(group: 'com.foo', name: 'gradle-local-eureka', version: '1.0-SNAPSHOT')
      }
  }
  apply from: file('gradle/foo.gradle')
  </code></pre>
  
  <p>foo.gradle</p>
  
  <pre><code>import com.foo.my.awesome.package.AwesomeService
  // do stuff
  </code></pre>
  
  <p>I get an unable to resolve class error if I try to import a class outside of build.gradle, does anyone have any insight as to why that wouldn't work or what the proper way of doing this?</p>