title: How to use custom Android.mk with new gradle build system
body: <p>I know how use custom <code>Android.mk</code> with old gradle: </p>
  
  <pre><code>    sourceSets.main {
          jniLibs.srcDir 'src/main/jni'
          jni.srcDirs = [] //disable automatic ndk-build call
      }
  
      // call regular ndk-build(.cmd) script from app directory
      task ndkBuild(type: Exec) {
          commandLine '/.../android-ndk-r10e/ndk-build', '-C', file('src/main').absolutePath
      }
  
      tasks.withType(JavaCompile) {
          compileTask -&gt; compileTask.dependsOn ndkBuild
      }
  </code></pre>
  
  <p>It's not working with new gradle: <code>com.android.tools.build:gradle-experimental:0.2.0</code> :</p>
  
  <pre><code>Error:Cause: com.android.build.gradle.managed.AndroidConfig_Impl
  </code></pre>