Skip to content

Commit

Permalink
Added provided .so files and added NDK check into gradle script
Browse files Browse the repository at this point in the history
  • Loading branch information
stealthcopter committed May 11, 2018
1 parent 4cfbc04 commit 41cbbf2
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 3 deletions.
Binary file removed app/libs/armeabi/libtool-checker.so
Binary file not shown.
28 changes: 25 additions & 3 deletions rootbeerlib/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,32 @@ android {
}
}

externalNativeBuild {
ndkBuild {
path 'src/main/jni/Android.mk'
// Perform a check to see if the NDK exists
if (android.getNdkDirectory().exists()){
// If it does, perform compilation
logger.debug("Found NDK"+android.getNdkDirectory())

externalNativeBuild {
ndkBuild {
path 'src/main/jni/Android.mk'
}
}

}
else{
//Otherwise disable automatic ndk-build and use pre-compiled .so files
logger.debug("NDK Not Present"+android.getNdkDirectory())

sourceSets {
main {
jni.srcDirs = []
}
}
}

packagingOptions {
// In case there are both compiled .so files and provided .so files, pick the first (should be generated)
pickFirst('lib/*/libtool-checker.so')
}
}

Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit 41cbbf2

Please sign in to comment.