Cancelling Exec task does not work

For developing Android app which also includes native code, we use exec task to call ndk-build, as explained here. We use Gradle 2.13 and android plugin v2.1.0. We still can’t use gradle-experimental plugin and software component model for building NDK as its still not mature enough for our needs.

Everything actually works OK for us, except cancelling builds. Obviously, NDK build task takes most time and if you hit cancel button from Android Studio, it keeps trying to cancel build but in never succeeds - the build is cancelled only after this long exec task has been finished. Even if we perform build via gradle wrapper from command line - after hitting ctrl+c the build output stops, but gradle daemon still keeps building it - it is easy to check this with Mac Activity Monitor.

Is there a possibility to cancel ongoing exec task, without manually killing the gradle process with pkill?