title: Gradle task for classes.dex CRC calculation
body: <p>I'd like to create a Gradle task that computes the <code>classes.dex</code> CRC, then writes the resulting value into a resource string. This value will be checked at runtime to determine whether the APK has been tampered or not. The problem is that beginning with Gradle plugin 1.4.+ it is not possible to access the dex task anymore. Instead, we should use Transform API. I found very little documentation about Gradle tasks in the Android environment, so I would ask a few questions:</p>
  
  <ol>
  <li>What's the Gradle task that deals with the <code>classes.dex</code> file?</li>
  <li>How should the Transform work with this task?</li>
  </ol>
  
  <p>I've seen lots of threads about this argument, but none of these have a working solution. Thanks in advance!</p>