title: How to configure/run gradle to build and assemble release type running all unit tests first
body: <p>When I run </p>
  
  <pre><code>./gradlew clean assembleRelease
  </code></pre>
  
  <p>my binaries are built, but the unit tests do not run.</p>
  
  <p>When I run</p>
  
  <pre><code>./gradlew clean build
  </code></pre>
  
  <p>all binaries are built and all unit tests are run, twice... once for debug and once for release.</p>
  
  <p>How can I achieve what 'clean build' does but only for the release buildType?</p>
  
  <p>Context: The main problem I am trying to solve is what is the proper way to configure a jenkins job to build assemble and run all unit tests for the RELEASE buildType only.</p>