Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2017
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. sourceSets.Main{
  2. jni.srcDirs = [] //Disable automatic ndk-build call
  3. }
  4. task ndkBuild(type: Exec, description: 'Compile JNI source via NDK'){
  5. commandLine "C:/Users/wubie/AppData/Local/Android/sdk/ndk-bundle/ndk-build.cmd",
  6. 'NDK_PROJECT_PATH=build/intermediates/ndk',
  7. 'NDK_LIBS_OUT=src/main/jniLibs',
  8. 'APP_BUILD_SCRIPT=src/main/jni/Android.mk',
  9. 'NDK_APPLICATION_MK=src/main/jni/Application.mk'
  10. }
  11. tasks.withType(JavaCompile){
  12. compileTask -> compileTask.dependsOn ndkBuild
  13.  
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement