According to OVERVIEW.html in the NDK docs, you set the environment variable "NDK_LIBS_OUT" to make the libraries go somewhere other than $PROJECT/libs.
In my case, Gradle seems to want the shared libraries to go to $PROJECT/src/main/jniLibs, so I set NDK_LIBS_OUT to be that directory. This works.
Now how would I go about setting this up in Android.mk or Application.mk? I don't want to have to set this environment variable every time, especially if I hand off the build scripts to someone else.