v0.4.3: improved ndk build task
Should now work on more devices than just mine Also included .so files built with new script, no funtional change, but their size is a bit different
This commit is contained in:
parent
a5da078540
commit
6529371326
|
@ -8,20 +8,25 @@ android {
|
|||
description "builds JNI libs from source. " +
|
||||
"This requires the Android NDK and is optional as precompiled libs are provided."
|
||||
|
||||
workingDir = "./src/main"
|
||||
def root = project(':SPD-classes').projectDir
|
||||
def ndkDir = android.ndkDirectory
|
||||
|
||||
//Need to start cmd first on windows systems, otherwise these are the same
|
||||
//Need to execute through cmd on windows systems
|
||||
if (System.properties["os.name"].toLowerCase().contains("windows")){
|
||||
commandLine "cmd", "/c" , "$ndkDir${File.separator}ndk-build " +
|
||||
"NDK_APPLICATION_MK=./jniSources/Application.mk " +
|
||||
"NDK_LIBS_OUT=./jniLibs"
|
||||
executable "cmd"
|
||||
args "/c", "$ndkDir${File.separator}ndk-build",
|
||||
"NDK_PROJECT_PATH=$root/src/main/jniSources",
|
||||
"NDK_APPLICATION_MK=$root/src/main/jniSources/Application.mk",
|
||||
"APP_BUILD_SCRIPT=$root/src/main/jniSources/Android.mk",
|
||||
"NDK_LIBS_OUT=$root/src/main/jniLibs"
|
||||
|
||||
} else {
|
||||
commandLine "$ndkDir${File.separator}ndk-build " +
|
||||
"NDK_APPLICATION_MK=./jniSources/Application.mk " +
|
||||
"NDK_LIBS_OUT=./jniLibs"
|
||||
executable "$ndkDir/ndk-build"
|
||||
args "NDK_PROJECT_PATH=$root/src/main/jniSources",
|
||||
"NDK_APPLICATION_MK=$root/src/main/jniSources/Application.mk",
|
||||
"APP_BUILD_SCRIPT=$root/src/main/jniSources/Android.mk",
|
||||
"NDK_LIBS_OUT=$root/src/main/jniLibs"
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
Binary file not shown.
Binary file not shown.
|
@ -1,3 +1,3 @@
|
|||
APP_ABI := armeabi x86
|
||||
APP_BUILD_SCRIPT := ./jniSources/Android.mk
|
||||
APP_OPTIM := release
|
||||
APP_OPTIM := release
|
||||
APP_PLATFORM := android-8
|
Loading…
Reference in New Issue
Block a user