I'm building some C++ libraries through Android Studio and I would like not to pollute my source tree with those .externalNativeBuild
folders.
Is it possible to specify where they should land much like buildDir
for Java binaries?
I tried using that -B
argument like that:
externalNativeBuild
{
cmake
{
arguments '-DANDROID_PLATFORM=android-14',
'-DANDROID_TOOLCHAIN=clang', '-DANDROID_STL=gnustl_static',
'-BC:/Dev/AndroidCMake'
}
}
It works to some extent as the specified folder is created and contains some of the build's by-products. However the build is broken and the .externalNativeBuild
folder is still created. It contains some files too. So it looks like that folder is specified somewhere else in the tool chain.
Here is the error I'm getting:
Error:Expected json generation to create 'C:\Dev\Android\TestApp\app\.externalNativeBuild\cmake\debug\armeabi-v7a\android_gradle_build.json' but it didn't
That json file landed in the specified -B folder but the toolchain is still expecting it in that other folder.