assembleDebug.dependsOn not working
<p>First of all: This is not a duplicate of this </p>

<p><a href="https://stackoverflow.com/q/38547400/770467">Error:Could not find property &#39;assembleDebug&#39; on project &#39;:app&#39;</a></p>

<p>The problem:</p>

<p>Since the update to Android Studio 2.2 (gradle plugin 2.2) You can no longer make the task <code>assembleDebug</code> or <code>assembleRelease</code> to be dependent on a new task in this way:</p>

<p><code>assembleDebug.dependsOn 'checkstyle'</code></p>

<p>More details in this <a href="https://code.google.com/p/android/issues/detail?id=219732" rel="noreferrer">issue</a></p>

<p>It gives you the following error:</p>

<blockquote>
  <p>Error:Could not get unknown property 'assembleDebug' for project
  ':app' of type org.gradle.api.Project.</p>
</blockquote>