title: Instrumentation test not creating with Gradle
body: <p>I just recently converted my project to Gradle and it works fine.  I'm trying to add some tests to it now.  I followed the Android Gradle user guide for setting up my <code>build.gradle</code> with tests.  Here is my <code>build.gradle</code>:</p>
  
  <pre><code>buildscript {
      repositories {
          maven {
              url 'http://repo1.maven.org/maven2'
          }
      }
      dependencies {
          classpath 'com.android.tools.build:gradle:0.7.+'
      }
  }
  
  apply plugin: 'android'
  
  repositories {
      mavenCentral()
  }
  
  dependencies {
      compile fileTree(dir: 'libs', include: '*.jar')
  }
  
  android {
      compileSdkVersion 19
      buildToolsVersion "19.0.1"
  
      defaultConfig {
          testPackageName "com.instrumentTest.java"
          testInstrumentationRunner "android.test.InstrumentationTestRunner"
      }
  
      sourceSets {
          main {
              manifest.srcFile 'AndroidManifest.xml'
              java.srcDirs = ['src']
              resources.srcDirs = ['src']
              aidl.srcDirs = ['src']
              renderscript.srcDirs = ['src']
              res.srcDirs = ['res']
              assets.srcDirs = ['assets']
          }
  
          // Move the tests to tests/java, tests/res, etc...
          instrumentTest.setRoot('src/instrumentTest')
  
          // 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>I created a package under <code>src/</code> called <code>com.instrumentTest.java</code> that I put a sample <code>ServiceTest.java</code> class in to test my Service.  I run the test using <code>gradle aDT</code> and get this:</p>
  
  <pre><code>* Exception is:
  org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':&lt;MyProject&gt;:compileDebugAidl'.
          at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69)
          at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)
          at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35)
  Caused by: com.android.ide.common.internal.LoggedErrorException: Failed to run command:
  &lt;some big command&gt;
  Error Code:
          1
  Output:
          \src\com\instrumentTest\java\MyServiceTest.java:10: syntax error
          \src\com\instrumentTest\java\MyServiceTest.java:10: syntax error don't know what to do with "public"
          \src\com\instrumentTest\java\MyServiceTest.java:10: syntax error don't know what to do with "public"
          \src\com\instrumentTest\java\MyServiceTest.java:10: syntax error don't know what to do with "class"
          \src\com\instrumentTest\java\MyServiceTest.java:10: syntax error don't know what to do with "MyServiceTest"
          \src\com\instrumentTest\java\MyServiceTest.java:10: syntax error don't know what to do with "extends"
          \src\com\instrumentTest\java\MyServiceTest.java:10: syntax error don't know what to do with "ServiceTestCase&lt;MyService&gt;"
  </code></pre>
  
  <p>It outputs the <code>syntax error don't know what to do with</code> for each line of code in my sample test class.  Not really sure what's going on.  The documentation for setting all of this up is pretty fuzzy.  </p>
  
  <p>I'm also not really sure the difference between <code>assembleDebugTest</code>, <code>connectedInstrumentTest</code>, and <code>installDebugTest</code> based on their descriptions from running <code>gradle tasks</code>.  Is there something I have to do to my manifest in order to have the tests visible to Gradle?  Am I supposed to create my tests in an entirely different project?  I read that previously people would create separate test projects, but since I set the root for instrumentTest in the build.gradle file I assume we can do it all from one project now?</p>