Updated example to start using core structure
This commit is contained in:
parent
0182836386
commit
6c41ceb0b2
15 changed files with 622 additions and 118 deletions
|
|
@ -1,18 +1,23 @@
|
|||
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 24
|
||||
|
||||
defaultConfig {
|
||||
applicationId "com.kompute.examples.android"
|
||||
applicationId "com.ethicalml.kompute.examples.android"
|
||||
minSdkVersion 24
|
||||
targetSdkVersion 24
|
||||
versionCode 1
|
||||
versionName "0.0.1"
|
||||
versionCode = 1
|
||||
versionName = "0.0.1"
|
||||
externalNativeBuild {
|
||||
cmake {
|
||||
abiFilters "armeabi-v7a", 'arm64-v8a', 'x86', 'x86_64'
|
||||
arguments '-DANDROID_TOOLCHAIN=clang', '-DANDROID_STL=c++_static'
|
||||
arguments '-DANDROID_TOOLCHAIN=clang', '-DANDROID_STL=c++_static', '-DKOMPUTE_OPT_ANDOID_BUILD=1', '-DKOMPUTE_OPT_INSTALL=0'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -21,13 +26,22 @@ android {
|
|||
path 'src/main/jni/CMakeLists.txt'
|
||||
}
|
||||
}
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled = false
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
|
||||
sourceSets {
|
||||
main {
|
||||
jniLibs {
|
||||
// Must have ndk-r12 or better which including layer binaries
|
||||
srcDirs = ["${valLayerBinDir}"]
|
||||
}
|
||||
}
|
||||
}
|
||||
ndkVersion '21.3.6528147'
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled = false
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue