1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 15:53:03 +04:00

Enable Android AAR package build with SDK project itself without Python

- Added JavaDoc package build and publishing
- Added Source package build and publishing
- More metadata for publishing
- Disable native samples build with aar, because prefab is not complete yet
This commit is contained in:
Alexander Smorkalov
2023-12-14 18:38:35 +03:00
parent 3d1f6465da
commit b59eca22ae
4 changed files with 98 additions and 1 deletions
+12 -1
View File
@@ -225,9 +225,20 @@ include ':${__dir}'
configure_file("${path}/build.gradle.in" "${ANDROID_TMP_INSTALL_BASE_DIR}/${__dir}/build.gradle" @ONLY)
install(FILES "${ANDROID_TMP_INSTALL_BASE_DIR}/${__dir}/build.gradle" DESTINATION "${ANDROID_INSTALL_SAMPLES_DIR}/${__dir}" COMPONENT samples)
file(APPEND "${ANDROID_TMP_INSTALL_BASE_DIR}/settings.gradle" "
# HACK: AAR packages generated from current OpenCV project has incomple prefab part
# and cannot be used for native linkage against OpenCV.
# Alternative way to build AAR: https://github.com/opencv/opencv/blob/4.x/platforms/android/build_java_shared_aar.py
if("${__dir}" STREQUAL "tutorial-2-mixedprocessing" OR "${__dir}" STREQUAL "tutorial-4-opencl")
file(APPEND "${ANDROID_TMP_INSTALL_BASE_DIR}/settings.gradle" "
if (gradle.opencv_source == 'sdk_path') {
include ':${__dir}'
}
")
else()
file(APPEND "${ANDROID_TMP_INSTALL_BASE_DIR}/settings.gradle" "
include ':${__dir}'
")
endif()
endmacro()