In traditional NDK make file, I can link a prebuilt static library and specify its headers directory:
Android.mk
include $(CLEAR_VARS)
LOCAL_MODULE := somelibrary-prebuilt-static
LOCAL_SRC_FILES := $(TARGET_ARCH_ABI)/libsomelibrary.a
LOCAL_EXPORT_C_INCLUDES := include
include $(PREBUILT_STATIC_LIBRARY)
How do I do that in build.gradle
using the new plugin's DSL?
--
You received this message because you are subscribed to the Google Groups "adt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adt-dev+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
android.ndk { moduleName = "TestProject"
// Generic stuff cppFlags += "-O2" cppFlags += "-std=gnu++11" cppFlags += "-frtti" cppFlags += "-fexceptions" cppFlags += "-fpermissive" cppFlags += "-DANDROID" def jniPath = "src/main/jni" cppFlags += "-I${file(jniPath)}".toString() file(jniPath).eachDirRecurse { dir -> cppFlags += "-I${file(dir)}".toString() }
CFlags += cppFlags
ldLibs += ["android", "EGL","GLESv2", "dl", "log", "jpeg", "png", "tiff", "z"] stl = "c++_static" } android.buildTypes { release { minifyEnabled = false proguardFiles += file('proguard-rules.txt') } } android.productFlavors { def libPath = "src/main/jni/prebuilt/"
create("arm7") { ndk.abiFilters += "armeabi-v7a"
ndk.ldFlags += "-L${file(libPath+"libjpeg/libs/armeabi-v7a/")}".toString() ndk.ldFlags += "-L${file(libPath+"libpng/libs/armeabi-v7a/")}".toString() ndk.ldFlags += "-L${file(libPath+"libtiff/libs/armeabi-v7a/")}".toString() } create("arm") { ndk.abiFilters += "armeabi" ndk.ldFlags += "-L${file(libPath+"libjpeg/libs/armeabi/")}".toString() ndk.ldFlags += "-L${file(libPath+"libpng/libs/armeabi/")}".toString() ndk.ldFlags += "-L${file(libPath+"libtiff/libs/armeabi/")}".toString() } create("x86-32") { ndk.abiFilters += "x86" ndk.ldFlags += "-L${file(libPath+"libjpeg/libs/x86")}".toString() ndk.ldFlags += "-L${file(libPath+"libpng/libs/x86")}".toString() ndk.ldFlags += "-L${file(libPath+"libtiff/libs/x86")}".toString() } create("fat") }