2018-11-06 01:39:09 +08:00
|
|
|
apply plugin: 'com.android.library'
|
|
|
|
|
2020-01-04 00:15:35 +08:00
|
|
|
def openCVersionName = "@OPENCV_VERSION@"
|
|
|
|
def openCVersionCode = ((@OPENCV_VERSION_MAJOR@ * 100 + @OPENCV_VERSION_MINOR@) * 100 + @OPENCV_VERSION_PATCH@) * 10 + 0
|
|
|
|
|
2018-11-06 01:39:09 +08:00
|
|
|
android {
|
|
|
|
compileSdkVersion @ANDROID_COMPILE_SDK_VERSION@
|
|
|
|
|
|
|
|
defaultConfig {
|
|
|
|
minSdkVersion @ANDROID_MIN_SDK_VERSION@
|
|
|
|
targetSdkVersion @ANDROID_TARGET_SDK_VERSION@
|
2019-07-12 04:04:05 +08:00
|
|
|
|
2020-01-04 00:15:35 +08:00
|
|
|
versionCode openCVersionCode
|
|
|
|
versionName openCVersionName
|
|
|
|
|
2019-07-12 04:04:05 +08:00
|
|
|
externalNativeBuild {
|
|
|
|
cmake {
|
|
|
|
arguments "-DANDROID_STL=@ANDROID_STL@"
|
|
|
|
targets "opencv_jni_shared"
|
|
|
|
}
|
|
|
|
}
|
2018-11-06 01:39:09 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
buildTypes {
|
2019-03-11 22:16:42 +08:00
|
|
|
debug {
|
2019-05-19 01:13:39 +08:00
|
|
|
packagingOptions {
|
|
|
|
doNotStrip '**/*.so' // controlled by OpenCV CMake scripts
|
2019-03-11 22:16:42 +08:00
|
|
|
}
|
|
|
|
}
|
2018-11-06 01:39:09 +08:00
|
|
|
release {
|
2019-05-19 01:13:39 +08:00
|
|
|
packagingOptions {
|
|
|
|
doNotStrip '**/*.so' // controlled by OpenCV CMake scripts
|
|
|
|
}
|
2018-11-06 01:39:09 +08:00
|
|
|
minifyEnabled false
|
|
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
compileOptions {
|
|
|
|
sourceCompatibility JavaVersion.VERSION_1_6
|
|
|
|
targetCompatibility JavaVersion.VERSION_1_6
|
|
|
|
}
|
|
|
|
|
|
|
|
sourceSets {
|
|
|
|
main {
|
|
|
|
jniLibs.srcDirs = ['../../jni']
|
|
|
|
java.srcDirs = ['src'] // TODO Use original files instead of copied into build directory
|
|
|
|
aidl.srcDirs = ['src']
|
|
|
|
res.srcDirs = ['@OpenCV_SOURCE_DIR@/modules/java/android_sdk/android_gradle_lib/res']
|
|
|
|
manifest.srcFile 'AndroidManifest.xml'
|
|
|
|
}
|
|
|
|
}
|
2019-07-12 04:04:05 +08:00
|
|
|
|
|
|
|
externalNativeBuild {
|
|
|
|
cmake {
|
|
|
|
path (project.projectDir.toString() + '/libcxx_helper/CMakeLists.txt')
|
|
|
|
}
|
|
|
|
}
|
2018-11-06 01:39:09 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
}
|