From 76548e29bd62f299386cb919824b34ce4baf73cb Mon Sep 17 00:00:00 2001 From: Alexander Smorkalov <2536374+asmorkalov@users.noreply.github.com> Date: Wed, 7 Feb 2024 11:13:43 +0300 Subject: [PATCH] Merge pull request #24969 from asmorkalov:as/android_offline Allow multiple flags with OPENCV_GRADLE_VERBOSE_OPTIONS #24969 ### Pull Request Readiness Checklist Merge with https://github.com/opencv/ci-gha-workflow/pull/144 See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request - [x] I agree to contribute to the project under Apache 2 License. - [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV - [x] The PR is proposed to the proper branch - [x] There is a reference to the original bug report and related work - [ ] There is accuracy test, performance test and test data in opencv_extra repository, if applicable Patch to opencv_extra has the same branch name. - [ ] The feature is well documented and sample code can be built with the project CMake --- cmake/android/android_gradle_projects.cmake | 3 ++- modules/java/android_sdk/CMakeLists.txt | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/android/android_gradle_projects.cmake b/cmake/android/android_gradle_projects.cmake index 2b79806fa8..55079a3c96 100644 --- a/cmake/android/android_gradle_projects.cmake +++ b/cmake/android/android_gradle_projects.cmake @@ -141,6 +141,8 @@ if (gradle.opencv_source == 'sdk_path') { ") ocv_check_environment_variables(OPENCV_GRADLE_VERBOSE_OPTIONS) +ocv_update(OPENCV_GRADLE_VERBOSE_OPTIONS "-i") +separate_arguments(OPENCV_GRADLE_VERBOSE_OPTIONS UNIX_COMMAND "${OPENCV_GRADLE_VERBOSE_OPTIONS}") macro(add_android_project target path) get_filename_component(__dir "${path}" NAME) @@ -175,7 +177,6 @@ include ':${__dir}' if (BUILD_ANDROID_EXAMPLES) # build apk set(APK_FILE "${ANDROID_BUILD_BASE_DIR}/${__dir}/build/outputs/apk/release/${__dir}-${ANDROID_ABI}-release-unsigned.apk") - ocv_update(OPENCV_GRADLE_VERBOSE_OPTIONS "-i") add_custom_command( OUTPUT "${APK_FILE}" "${OPENCV_DEPHELPER}/android_sample_${__dir}" COMMAND ./gradlew ${OPENCV_GRADLE_VERBOSE_OPTIONS} "${__dir}:assemble" diff --git a/modules/java/android_sdk/CMakeLists.txt b/modules/java/android_sdk/CMakeLists.txt index 0bcc89ae29..b5fbc3d93d 100644 --- a/modules/java/android_sdk/CMakeLists.txt +++ b/modules/java/android_sdk/CMakeLists.txt @@ -153,7 +153,6 @@ set(depends ${the_module}_android_source_copy "${OPENCV_DEPHELPER}/${the_module} # build jar set(AAR_FILE "${OPENCV_JAVA_DIR}/build/outputs/aar/opencv-release.aar") -ocv_update(OPENCV_GRADLE_VERBOSE_OPTIONS "-i") add_custom_command( OUTPUT "${AAR_FILE}" "${OPENCV_DEPHELPER}/${the_module}_android" COMMAND ./gradlew ${OPENCV_GRADLE_VERBOSE_OPTIONS} "opencv:assemble"