From c0680ae846ad95c8e506d2963cff1e5cbeae9876 Mon Sep 17 00:00:00 2001 From: Alexander Smorkalov Date: Sat, 27 Jan 2024 14:41:03 +0300 Subject: [PATCH] Enable Android samples with native part with AAR package --- cmake/android/android_gradle_projects.cmake | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/cmake/android/android_gradle_projects.cmake b/cmake/android/android_gradle_projects.cmake index 2b79806fa8..bd6400e12f 100644 --- a/cmake/android/android_gradle_projects.cmake +++ b/cmake/android/android_gradle_projects.cmake @@ -221,20 +221,9 @@ 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) - # 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" " + file(APPEND "${ANDROID_TMP_INSTALL_BASE_DIR}/settings.gradle" " include ':${__dir}' ") - endif() endmacro()