title: Gradle 'Build Script error' occurs when I attempt to use testCompile in dependencies
body: <p>I'm working with Android Studio and in my dependencies for my application I attempting to add a testCompile dependency as listed here: <a href="http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html" rel="nofollow noreferrer">http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html</a>
  When I sync my file I get the error:
  <img src="https://i.stack.imgur.com/GT10e.png" alt="sync error screenshot"> I don't understand what is going on, my gradle build file in my root folder is set to <code>classpath 'com.android.tools.build:gradle:0.12.+'</code> and that's the most recent version. Why doesn't it recognize testCompile? I don't want to deploy test dependencies to production... Any helps would be appreciated.</p>
  
  <p>EDIT: Here is the project build file</p>
  
  <pre><code>buildscript {
      repositories {
          jcenter()
  
  
      }
      dependencies {
          classpath 'com.android.tools.build:gradle:0.12.+'
          // NOTE: Do not place your application dependencies here; they belong
          // in the individual module build.gradle files
      }
  }
  allprojects {
      repositories {
          jcenter()
      }
  }
  </code></pre>
  
  <p>and here is the src build file:</p>
  
  <pre><code>apply plugin: 'com.android.application'
  android {
      compileSdkVersion 17
      buildToolsVersion "20.0.0"
      defaultConfig {
          applicationId "com.example.edu.myApp"
          minSdkVersion 14
          targetSdkVersion 19
          versionCode 1
          versionName "1.0"
      }
      buildTypes {
          release {
              runProguard false
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
          }
          debug{
              runProguard false
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
          }
      }
  }
  dependencies {
      compile fileTree(dir: 'libs', include: ['*.jar'])
      compile files('libs/scribe-1.3.5.jar')
      compile files('libs/json_simple-1.1.jar')
      compile 'com.google.android.gms:play-services:5.0.77'
      // Can't be higher than 19 if we want to support smaller android versions
      compile 'com.android.support:appcompat-v7:19.+'
      // You must install or update the Support Repository through the SDK manager to use this dependency.
      compile 'com.android.support:support-v4:19.+'
      // This Mockito includes all dependancies (great for us)
      testCompile "org.mockito:mockito-core:1.9.+"
      testCompile 'org.hamcrest:hamcrest-all:1.3'
      testCompile 'org.objenesis:objenesis:1.2'
  }
  </code></pre>