The current NDK support is still working for simple projects (ie. C/C++ sources with no dependency on other NDK prebuilt libraries), including when using the latest r10d NDK.
But it's really limited, and as the warning says, it's deprecated, yes.
What I recommend to do is to simply deactivate it, and make gradle call ndk-build directly. This way you can keep your classic Android.mk/Application.mk configuration files, and calling ndk-build from your project will still work the same as with an eclipse project:
import org.apache.tools.ant.taskdefs.condition.Os
...
android {
...
sourceSets.main {
jniLibs.srcDir 'src/main/libs' //set .so files location to libs instead of jniLibs
jni.srcDirs = [] //disable automatic ndk-build call
}
// add a task that calls regular ndk-build(.cmd) script from app directory
task ndkBuild(type: Exec) {
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
commandLine 'ndk-build.cmd', '-C', file('src/main').absolutePath
} else {
commandLine 'ndk-build', '-C', file('src/main').absolutePath
}
}
// add this task as a dependency of Java compilation
tasks.withType(JavaCompile) {
compileTask -> compileTask.dependsOn ndkBuild
}
}