title: Android: Skip Gradle "testClasses" task for a dependency project
body: <p>I have followed <a href="https://developer.android.com/training/testing/unit-testing/local-unit-tests.html">this guide</a> to create a JUnit test file for my main Android module (let's call it "module-a"), in Android Studio v1.4.</p>
  
  <p>My "module-a" has a dependency on an external library that is provided as a <code>.aar</code> file and for which I had to create a dedicated module.</p>
  
  <p>This dependency causes an error:</p>
  
  <p>When right clicking the test Java file and hitting "Run MyTestName" , it fails with this error</p>
  
  <pre><code>Error:Gradle: 
  FAILURE: Build failed with an exception.
  
  * What went wrong:
  Task 'testClasses' not found in project ':module-b'.
  </code></pre>
  
  <p>Removing the dependency on module-b solves the problem.</p>
  
  <p>Excerpt of module-a build.gradle:</p>
  
  <pre><code>compile project(':module-b')
  </code></pre>
  
  <p>module-b build.gradle:</p>
  
  <pre><code>configurations.create("default")
  artifacts.add("default", file('library-b.aar'))
  </code></pre>
  
  <p><strong>How should I configure Gradle so that it does not try to run the <code>testClasses</code> task on "module-b" ? (this should solve my issue)</strong></p>