Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sourceSets.Main{
- jni.srcDirs = [] //Disable automatic ndk-build call
- }
- task ndkBuild(type: Exec, description: 'Compile JNI source via NDK'){
- commandLine "C:/Users/wubie/AppData/Local/Android/sdk/ndk-bundle/ndk-build.cmd",
- 'NDK_PROJECT_PATH=build/intermediates/ndk',
- 'NDK_LIBS_OUT=src/main/jniLibs',
- 'APP_BUILD_SCRIPT=src/main/jni/Android.mk',
- 'NDK_APPLICATION_MK=src/main/jni/Application.mk'
- }
- tasks.withType(JavaCompile){
- compileTask -> compileTask.dependsOn ndkBuild
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement