You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
76 lines
2.0 KiB
76 lines
2.0 KiB
apply plugin: 'com.android.application'
|
|
|
|
android {
|
|
compileSdkVersion 28
|
|
defaultConfig {
|
|
applicationId "com.example.realsense_native_example"
|
|
minSdkVersion 19
|
|
targetSdkVersion 28
|
|
versionCode 1
|
|
versionName "1.0"
|
|
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
|
externalNativeBuild {
|
|
cmake {
|
|
cppFlags "-fexceptions"
|
|
}
|
|
}
|
|
}
|
|
buildTypes {
|
|
release {
|
|
minifyEnabled false
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
|
}
|
|
}
|
|
externalNativeBuild {
|
|
cmake {
|
|
path "CMakeLists.txt"
|
|
}
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
|
implementation 'com.android.support:appcompat-v7:28.0.0'
|
|
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
|
|
testImplementation 'junit:junit:4.12'
|
|
androidTestImplementation 'com.android.support.test:runner:1.0.2'
|
|
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
|
|
}
|
|
|
|
//The lines below add librealsense to the application's dependencies
|
|
repositories {
|
|
maven{
|
|
url "https://egiintel.jfrog.io/artifactory/librealsense"
|
|
}
|
|
}
|
|
|
|
configurations {
|
|
downloadHeader
|
|
downloadSo
|
|
}
|
|
|
|
dependencies {
|
|
def version = '2.+'
|
|
downloadSo 'com.intel.realsense:librealsense:' + version + '@aar'
|
|
implementation 'com.intel.realsense:librealsense:' + version + '@aar'
|
|
downloadHeader 'com.intel.realsense:librealsense:' + version + '@zip'
|
|
}
|
|
|
|
task extractHeaders(type: Sync) {
|
|
dependsOn configurations.downloadHeader
|
|
from { configurations.downloadHeader.collect { zipTree(it) } }
|
|
into "$projectDir/src/main/cpp/include"
|
|
}
|
|
|
|
task extractSo(type: Sync) {
|
|
dependsOn configurations.downloadSo
|
|
from { configurations.downloadSo.collect { zipTree(it) } }
|
|
include("jni/**")
|
|
into "$buildDir/"
|
|
}
|
|
|
|
preBuild.dependsOn(extractHeaders)
|
|
preBuild.dependsOn(extractSo)
|
|
|
|
|