1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 07:13:02 +04:00

Merge pull request #24554 from asmorkalov:as/android_sdk_local_props

Android AAR package build and test with CI
This commit is contained in:
Alexander Smorkalov
2023-11-28 15:17:06 +03:00
committed by GitHub
18 changed files with 107 additions and 14 deletions
@@ -53,8 +53,10 @@ android {
dependencies {
//implementation fileTree(dir: 'libs', include: ['*.jar'])
if (gradle.opencv_source == "sdk_path") {
println 'Using OpenCV from SDK'
implementation project(':opencv')
} else if (gradle.opencv_source == "maven_local" || gradle.opencv_source == "maven_cenral") {
println 'Using OpenCV from Maven repo'
implementation 'org.opencv:opencv:@OPENCV_VERSION_PLAIN@'
}
}
@@ -4,8 +4,10 @@ set(target mixed_sample)
project(${target} CXX)
if (OPENCV_FROM_SDK)
message(STATUS "Using OpenCV from local SDK")
set(ANDROID_OPENCV_COMPONENTS "opencv_java" CACHE STRING "")
else()
message(STATUS "Using OpenCV from AAR (Maven repo)")
set(ANDROID_OPENCV_COMPONENTS "OpenCV::opencv_java${OPENCV_VERSION_MAJOR}" CACHE STRING "")
endif()