I'm attempting to use AndroidStudio with the experimental 0.2.0 plugin to edit a few C sources in our large NDK project. Iv'e hacked up a small project that includes only the sources I need to edit and all the headers it depends on. With a creative set of CFlags, ldFlags and ldLibs, Iv'e managed to get the project to compile.
The problem I have is adding the .so files that are built from another project to the apk. I've created a job that copies the shared objects to the local jniLibs directory, but they are never included in the apk. I've managed to include them by copying them into the intermediate gradle directory, but that hack does not survive a clean build.
I've tried the directories src/main/lib, src/main/libs and src/main/jniLibs. Defining a jniLibs srcDir seems to have no affect.
model {
android.sources {
main.jni.source.srcDir 'src/main/config'
main.jni.source.srcDir '../../../../drivers/audio/android'
main.jni.source.srcDir '../../../../drivers/audio/android/incl'
main.jni.source.srcDir '../../../../common/incl'
main.jni.source.srcDir '../../../../common/clib/incl'
main.jni.source.srcDir '../../../../common/utils/incl'
main.jniLibs.source.srcDir '../../../../libs'
}
}
Is there any way of including external libraries with the experimental plugin?