title: By default run gradle tests for project dependencies
body: <p>Is there a clean way to run all test task for project Java dependencies in Gradle ? I noticed that Java dependencies only get their "jar" task run, and skip test / build.  </p>
  
  <p>main-code build.gradle </p>
  
  <pre><code>dependencies {
          compile project(":shared-code")
  }
  </code></pre>
  
  <p>gradle :main-code:build    &lt;-- Command that I want to run (that will also run :shared-code:tests , don't want to explicitly state it)</p>
  
  <pre><code>:shared-code:compileJava UP-TO-DATE
  :shared-code:processResources UP-TO-DATE
  :shared-code:classes
  :shared-code:jar
  </code></pre>
  
  <p>&lt;-- what actually gets run for shared-code (not missing build/tests)</p>
  
  <p>** Best thing I can think of is a finalizeBy task on jar with test </p>