title: Gradle DSL method not found: 'appengine()'
body: <p>My project consists of an Android application and an Appengine Backend, I moved from eclipse to android studio and following some examples online as well as generating an appengine module from Android Studio I came up with this.</p>
  
  <p>The android application's Gradle file</p>
  
  <pre><code>apply plugin: 'android'
  
  dependencies {
      compile fileTree(dir: 'libs', include: '*.jar')
      //compile project(':appcompat_v7_2')
      compile 'com.android.support:support-v4:21.0.3'
      compile 'com.android.support:appcompat-v7:21.0.3'
      compile 'com.google.android.gms:play-services:6.5.87'
      compile project(path: ':AgriExpenseTT-AppEngine', configuration: 'android-endpoints') //line that supposedly links the AppengineProject
  }
  
  android {
  compileSdkVersion 19
  buildToolsVersion "20.0.0"
  
  defaultConfig {
      minSdkVersion 9
      targetSdkVersion 20
  }
  
  sourceSets {
      main {
          manifest.srcFile 'AndroidManifest.xml'
          java.srcDirs = ['src', 'endpoint-libs/libdeviceinfoendpoint-v1/deviceinfoendpoint/deviceinfoendpoint-v1-generated-source', 'endpoint-libs/librpurchaseendpoint-v1/rpurchaseendpoint/rpurchaseendpoint-v1-generated-source', 'endpoint-libs/libupaccendpoint-v1/upaccendpoint/upaccendpoint-v1-generated-source', 'endpoint-libs/libcycleendpoint-v1/cycleendpoint/cycleendpoint-v1-generated-source', 'endpoint-libs/libtranslogendpoint-v1/translogendpoint/translogendpoint-v1-generated-source', 'endpoint-libs/libmessageEndpoint-v1/messageEndpoint/messageendpoint-v1-generated-source', 'endpoint-libs/libcycleuseendpoint-v1/cycleuseendpoint/cycleuseendpoint-v1-generated-source']
          resources.srcDirs = ['src', 'endpoint-libs/libdeviceinfoendpoint-v1/deviceinfoendpoint/deviceinfoendpoint-v1-generated-source', 'endpoint-libs/librpurchaseendpoint-v1/rpurchaseendpoint/rpurchaseendpoint-v1-generated-source', 'endpoint-libs/libupaccendpoint-v1/upaccendpoint/upaccendpoint-v1-generated-source', 'endpoint-libs/libcycleendpoint-v1/cycleendpoint/cycleendpoint-v1-generated-source', 'endpoint-libs/libtranslogendpoint-v1/translogendpoint/translogendpoint-v1-generated-source', 'endpoint-libs/libmessageEndpoint-v1/messageEndpoint/messageendpoint-v1-generated-source', 'endpoint-libs/libcycleuseendpoint-v1/cycleuseendpoint/cycleuseendpoint-v1-generated-source']
          aidl.srcDirs = ['src', 'endpoint-libs/libdeviceinfoendpoint-v1/deviceinfoendpoint/deviceinfoendpoint-v1-generated-source', 'endpoint-libs/librpurchaseendpoint-v1/rpurchaseendpoint/rpurchaseendpoint-v1-generated-source', 'endpoint-libs/libupaccendpoint-v1/upaccendpoint/upaccendpoint-v1-generated-source', 'endpoint-libs/libcycleendpoint-v1/cycleendpoint/cycleendpoint-v1-generated-source', 'endpoint-libs/libtranslogendpoint-v1/translogendpoint/translogendpoint-v1-generated-source', 'endpoint-libs/libmessageEndpoint-v1/messageEndpoint/messageendpoint-v1-generated-source', 'endpoint-libs/libcycleuseendpoint-v1/cycleuseendpoint/cycleuseendpoint-v1-generated-source']
          renderscript.srcDirs = ['src', 'endpoint-libs/libdeviceinfoendpoint-v1/deviceinfoendpoint/deviceinfoendpoint-v1-generated-source', 'endpoint-libs/librpurchaseendpoint-v1/rpurchaseendpoint/rpurchaseendpoint-v1-generated-source', 'endpoint-libs/libupaccendpoint-v1/upaccendpoint/upaccendpoint-v1-generated-source', 'endpoint-libs/libcycleendpoint-v1/cycleendpoint/cycleendpoint-v1-generated-source', 'endpoint-libs/libtranslogendpoint-v1/translogendpoint/translogendpoint-v1-generated-source', 'endpoint-libs/libmessageEndpoint-v1/messageEndpoint/messageendpoint-v1-generated-source', 'endpoint-libs/libcycleuseendpoint-v1/cycleuseendpoint/cycleuseendpoint-v1-generated-source']
          res.srcDirs = ['res']
          assets.srcDirs = ['assets']
      }
  
      // Move the tests to tests/java, tests/res, etc...
      instrumentTest.setRoot('tests')
  
      // Move the build types to build-types/&lt;type&gt;
      // For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ...
      // This moves them out of them default location under src/&lt;type&gt;/... which would
      // conflict with src/ being used by the main source set.
      // Adding new build types or product flavors should be accompanied
      // by a similar customization.
      debug.setRoot('build-types/debug')
      release.setRoot('build-types/release')
  }
  }
  </code></pre>
  
  <p>The appengine's gradle file</p>
  
  <pre><code>apply plugin: 'java'
  dependencies {
      compile fileTree(dir: 'libs', include: '*.jar')
  
      compile 'com.google.appengine:appengine-endpoints:1.9.1'
      compile 'com.google.appengine:appengine-endpoints-deps:1.9.1'
      compile 'javax.servlet:servlet-api:2.5'
      compile 'org.datanucleus:datanucleus-core:3.2.8'
      compile 'com.google.appengine.orm:datanucleus-appengine:2.1.2'
      compile group: 'javax.persistence', name: 'persistence-api', version: '1.0'
  }
  repositories {
      mavenCentral()
  }
  sourceSets {
      main.java.srcDirs = ['src']
      main.resources.srcDirs = ['src']
      test.java.srcDirs = ['tests/java']
      test.resources.srcDirs = ['tests/resources']
  }
  
  appengine { // ! ERROR IS HERE !
  downloadSdk = true
  appcfg {
      oauth2 = true
  }
  endpoints {
      getClientLibsOnBuild = true
      getDiscoveryDocsOnBuild = true
  }
  }
  </code></pre>
  
  <p>Error</p>
  
  <pre><code>Could not find method appengine() for arguments        [build_8nkni14q2n6l61jnsyaantjd6$_run_closure4@188b4628] on project ':AgriExpenseTT-AppEngine'
  </code></pre>