llama-cpp-turboquant/examples/android/android-simple/app/build.gradle
2020-10-03 10:54:04 +01:00

49 lines
1.4 KiB
Groovy

apply plugin: 'com.android.application'
Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())
def ndkDir = properties.getProperty('ndk.dir')
def valLayerBinDir = "${ndkDir}/sources/third_party/vulkan/src/build-android/jniLibs"
android {
compileSdkVersion 26
defaultConfig {
applicationId "com.ethicalml.kompute.examples.android"
minSdkVersion 26
targetSdkVersion 26
versionCode = 1
versionName = "0.0.1"
externalNativeBuild {
cmake {
abiFilters "armeabi-v7a", 'arm64-v8a', 'x86', 'x86_64'
arguments '-DANDROID_TOOLCHAIN=clang', '-DANDROID_STL=c++_static', '-DKOMPUTE_OPT_ANDOID_BUILD=1', '-DKOMPUTE_OPT_INSTALL=0'
}
}
}
externalNativeBuild {
cmake {
path 'src/main/jni/CMakeLists.txt'
}
}
sourceSets {
main {
jniLibs {
// Must have ndk-r12 or better which including layer binaries
srcDirs = ["${valLayerBinDir}"]
}
}
}
buildTypes {
release {
minifyEnabled = false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
}