title: Running javah with the current project classpath using gradle
body: <p>I try to generate headers file with <code>javah</code>. I have some issues but my main concern is that I can't generate the classpath argument of the command line : This argument should contain the classpath of my current android project (<code>android.jar</code>, my project and its dependencies).</p>
  
  <pre><code>commandLine  org.gradle.internal.jvm.Jvm.current().getExecutable('javah'), 
  "-d", 'src/main/jni', 
  "-classpath", classpath, "my.project.MainActivity"
  </code></pre>
  
  <p>actually, the classpath (variable <code>classpath</code>) is generated by hand. I would like to generate it using gradle dependencies instead, as gradle depency cache path are complicated to use (hard to compute by hand, ...)</p>
  
  <p>It try to use <code>sourceSets.main.runtimeClasspath</code> and/or <code>sourceSets.main.compileClasspath</code> </p>
  
  <pre><code>def classpath = sourceSets.main.compileClasspath
  </code></pre>
  
  <p>but each time, gradle throw an error : </p>
  
  <pre><code>* What went wrong:
  A problem occurred evaluating project ':app'.
  &gt; Could not find property 'compileClasspath' on source set main.
  </code></pre>
  
  <p>How can I generate my classpath variable using the classpath of my current gradle project ?</p>