title: Android Studio Gradle Pre Build Step
body: <p>I would simply like to run a separate application (exe) prior to Gradle beginning the build progress.  My goal is have my exe (already written) auto-gen a dependancy file containing a build number, which I display in the UI.  All of the above is easy, but I know almost nothing of Gradle.</p>
  
  <p>This question has been asked, but the answers are terse snippets of Gradle, using Gradle tasks, and do not explain much.</p>
  
  <p>I want to use the same exe in different projects, so it takes a command argument to specify the location of the auto-gen file;</p>
  
  <p>"buildnum.exe /someworkspace/someproject/somefolder/version.java"</p>
  
  <p>How to I get this to run?  I'm using a typical build.gradle script;</p>
  
  <pre><code>buildscript {
      repositories {
          jcenter()
      }
      dependencies {
          classpath 'com.android.tools.build:gradle:1.1.0'
      }
  }
  
  allprojects {
      repositories {
          jcenter()
      }
  }
  </code></pre>