2018-11-06 01:39:09 +08:00
|
|
|
apply plugin: 'com.android.application'
|
|
|
|
|
|
|
|
android {
|
2023-11-17 19:17:17 +08:00
|
|
|
namespace 'org.opencv.samples.tutorial2'
|
2018-11-06 01:39:09 +08:00
|
|
|
compileSdkVersion @ANDROID_COMPILE_SDK_VERSION@
|
|
|
|
defaultConfig {
|
|
|
|
applicationId "org.opencv.samples.tutorial2"
|
|
|
|
minSdkVersion @ANDROID_MIN_SDK_VERSION@
|
|
|
|
targetSdkVersion @ANDROID_TARGET_SDK_VERSION@
|
|
|
|
versionCode 301
|
|
|
|
versionName "3.01"
|
|
|
|
|
|
|
|
externalNativeBuild {
|
|
|
|
cmake {
|
2023-11-17 19:17:17 +08:00
|
|
|
if (gradle.opencv_source == "sdk_path") {
|
|
|
|
arguments "-DOpenCV_DIR=" + project(':opencv').projectDir + "/@ANDROID_PROJECT_JNI_PATH@",
|
|
|
|
"-DOPENCV_FROM_SDK=TRUE"@OPENCV_ANDROID_CMAKE_EXTRA_ARGS@
|
|
|
|
|
|
|
|
} else {
|
|
|
|
arguments "-DOPENCV_VERSION_MAJOR=@OPENCV_VERSION_MAJOR@",
|
|
|
|
"-DOPENCV_FROM_SDK=FALSE"@OPENCV_ANDROID_CMAKE_EXTRA_ARGS@
|
|
|
|
}
|
2018-11-06 01:39:09 +08:00
|
|
|
targets "mixed_sample"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
buildTypes {
|
|
|
|
release {
|
|
|
|
minifyEnabled false
|
|
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
sourceSets {
|
|
|
|
main {
|
|
|
|
java.srcDirs = @ANDROID_SAMPLE_JAVA_PATH@
|
|
|
|
aidl.srcDirs = @ANDROID_SAMPLE_JAVA_PATH@
|
|
|
|
res.srcDirs = @ANDROID_SAMPLE_RES_PATH@
|
|
|
|
manifest.srcFile '@ANDROID_SAMPLE_MANIFEST_PATH@'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
externalNativeBuild {
|
|
|
|
cmake {
|
|
|
|
path '@ANDROID_SAMPLE_JNI_PATH@/CMakeLists.txt'
|
|
|
|
}
|
|
|
|
}
|
2023-11-17 19:17:17 +08:00
|
|
|
buildFeatures {
|
|
|
|
if (gradle.opencv_source == "maven_local" || gradle.opencv_source == "maven_cenral") {
|
|
|
|
prefab true
|
|
|
|
}
|
|
|
|
}
|
2018-11-06 01:39:09 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
//implementation fileTree(dir: 'libs', include: ['*.jar'])
|
2023-11-17 19:17:17 +08:00
|
|
|
if (gradle.opencv_source == "sdk_path") {
|
|
|
|
implementation project(':opencv')
|
|
|
|
} else if (gradle.opencv_source == "maven_local" || gradle.opencv_source == "maven_cenral") {
|
|
|
|
implementation 'org.opencv:opencv:@OPENCV_VERSION_PLAIN@'
|
|
|
|
}
|
2018-11-06 01:39:09 +08:00
|
|
|
}
|