title: Run a single Android (unit) test from gradle without loading other project dependencies
body: <p>I'm using the <a href="https://github.com/JakeWharton/gradle-android-test-plugin" rel="noreferrer">awesome plugin from Jake Wharton</a> for Android unit tests. My objective of taking the trouble to get these unit tests running, is for speed (TDD quick feedback and all).</p>
  
  <p>I've manage to configure it correctly and have some sample tests running as follows:</p>
  
  <pre><code>./gradlew test
  </code></pre>
  
  <p>Whenever I run the tests though I notice the following output:</p>
  
  <pre><code>Relying on packaging to define the extension of the main artifact has been deprecated and is scheduled to be removed in Gradle 2.0
  The Test.testReportDir property has been deprecated and is scheduled to be removed in Gradle 2.0. Please use the Test.getReports().getHtml().getDestination() property instead.
  The TaskContainer.add() method has been deprecated and is scheduled to be removed in Gradle 2.0. Please use the create() method instead.
  :mySampleApp:preBuild UP-TO-DATE
  :mySampleApp:preDebugBuild UP-TO-DATE
  :mySampleApp:preReleaseBuild UP-TO-DATE
  :libraries:facebook:compileLint
  :libraries:facebook:copyReleaseLint UP-TO-DATE
  :libraries:facebook:mergeReleaseProguardFiles UP-TO-DATE
  :libraries:facebook:packageReleaseAidl UP-TO-DATE
  :libraries:facebook:preBuild UP-TO-DATE
  :libraries:facebook:preReleaseBuild UP-TO-DATE
  :libraries:facebook:prepareReleaseDependencies
  :libraries:facebook:compileReleaseAidl UP-TO-DATE
  :libraries:facebook:compileReleaseRenderscript UP-TO-DATE
  :libraries:facebook:generateReleaseBuildConfig UP-TO-DATE
  :libraries:facebook:mergeReleaseAssets UP-TO-DATE
  :libraries:facebook:mergeReleaseResources UP-TO-DATE
  :libraries:facebook:processReleaseManifest UP-TO-DATE
  :libraries:facebook:processReleaseResources UP-TO-DATE
  :libraries:facebook:generateReleaseSources UP-TO-DATE
  :libraries:facebook:compileRelease UP-TO-DATE
  :libraries:facebook:processReleaseJavaRes UP-TO-DATE
  :libraries:facebook:packageReleaseJar UP-TO-DATE
  :libraries:facebook:packageReleaseLocalJar UP-TO-DATE
  :libraries:facebook:packageReleaseRenderscript UP-TO-DATE
  :libraries:facebook:packageReleaseResources UP-TO-DATE
  :libraries:facebook:bundleRelease UP-TO-DATE
  :mySampleApp:prepareComAndroidSupportAppcompatV71800Library UP-TO-DATE
  :mySampleApp:preparemySampleAppandroidLibrariesFacebookUnspecifiedLibrary UP-TO-DATE
  :mySampleApp:prepareDebugDependencies
  :mySampleApp:compileDebugAidl UP-TO-DATE
  :mySampleApp:compileDebugRenderscript UP-TO-DATE
  :mySampleApp:generateDebugBuildConfig UP-TO-DATE
  :mySampleApp:mergeDebugAssets UP-TO-DATE
  :mySampleApp:mergeDebugResources UP-TO-DATE
  :mySampleApp:processDebugManifest UP-TO-DATE
  :mySampleApp:processDebugResources UP-TO-DATE
  :mySampleApp:generateDebugSources UP-TO-DATE
  </code></pre>
  
  <p>Gradle seems to be loading ALL the dependencies for my project. </p>
  
  <p>My Sample Test is as follows:</p>
  
  <pre><code>package com.mycompany.mysampleapp;
  
  import org.junit.Test;
  
  import static org.fest.assertions.api.Assertions.assertThat;
  
  public class AdditionOperationsTest {
    @Test public void testModulus() {
      assertThat(1).isEqualTo(1);
    }
  }
  </code></pre>
  
  <p>This test should actually take a fraction of a second to run. My understanding is that all that pre-loading of the project dependencies is bogging it down.</p>
  
  <p>In the good days, I would make sure i have what i need in the CLASSPATH and just run something like: </p>
  
  <pre><code>javac src/test/java/main/java/com/micromobs/pkk/AdditionOperationsTest.java
  java org.junit.runner.JUnitCore com.micromobs.pkk.AdditionOperationsTest
  </code></pre>
  
  <p>Considering this is an Android project with gradle, I'm assuming i would have to do something a little different like create specific tasks in the gradle build file, that include only my test files for my sample project, and then run a gradle command ./gradlew taskName ?</p>
  
  <h1>Question: Is it possible to run the single test "AdditionOperationsTest" within the context of my project (com.mycompany.mysampleapp) alone so that it doesn't load the external project dependencies</h1>
  
  <p>Here's how my configuration files currently look like:</p>
  
  <pre><code># settings.gradle
  include ':libraries:gradle-android-test-plugin'
  include ':libraries:facebook', ':mysampleapp'
  
  # build.gradle
  ...
  apply plugin: 'android-test'
  
  dependencies {
      testCompile 'junit:junit:4.10'
      testCompile 'org.robolectric:robolectric:2.1.+'
      testCompile 'com.squareup:fest-android:1.0.+'
  }
  
  # location of my test files:
  androidproj/mysampleapp/src/test/java/main/com/mycompany/mysampleapp/AdditionOperationsTest.java
  </code></pre>