diff options
| author | Alexey Edelev <alexey.edelev@qt.io> | 2025-05-27 10:56:34 +0200 |
|---|---|---|
| committer | Alexey Edelev <alexey.edelev@qt.io> | 2025-07-07 21:20:39 +0200 |
| commit | c01026f03ec51733065697487662bbad14a4ac30 (patch) | |
| tree | 94c5b452c31f22664fdefe98e001ef6e91b34a79 /src/corelib/Qt6AndroidGradleHelpers.cmake | |
| parent | f430c5ae81238b47939fca610f5d22ab030a4852 (diff) | |
Release AndroidManifest.xml template from genex placeholders
Read the template and substitute symbols that are sensitive for
generator expression processor with the respective generator
expressions implictily, instead of forcing users to use them in
templates.
Side effect of this change - users cannot specify generator expressions
directly in templates anymore, not that we already anounced this
feature, but is worth mentioning.
Change-Id: I565b0c0780211801467627ed4f3de3629b8efa08
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Diffstat (limited to 'src/corelib/Qt6AndroidGradleHelpers.cmake')
| -rw-r--r-- | src/corelib/Qt6AndroidGradleHelpers.cmake | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/corelib/Qt6AndroidGradleHelpers.cmake b/src/corelib/Qt6AndroidGradleHelpers.cmake index cb8118adde4..09184c93b69 100644 --- a/src/corelib/Qt6AndroidGradleHelpers.cmake +++ b/src/corelib/Qt6AndroidGradleHelpers.cmake @@ -479,6 +479,11 @@ function(_qt_internal_android_generate_target_android_manifest target) ">" ) + file(READ "${template_file}" manifest_content) + string(REPLACE ">" "$<ANGLE-R>" manifest_content "${manifest_content}") + string(REPLACE ";" "$<SEMICOLON>" manifest_content "${manifest_content}") + string(REPLACE "," "$<COMMA>" manifest_content "${manifest_content}") + _qt_internal_android_convert_permissions(APP_PERMISSIONS ${target} XML) set(feature_prefix "\n <uses-feature android:name=\"") @@ -494,11 +499,11 @@ function(_qt_internal_android_generate_target_android_manifest target) set(APP_ARGUMENTS "${QT_ANDROID_APPLICATION_ARGUMENTS}") - _qt_internal_configure_file(GENERATE OUTPUT "${out_file}.tmp" - INPUT "${template_file}") + _qt_internal_configure_file(GENERATE OUTPUT "${temporary_file}" + CONTENT "${manifest_content}") set_property(TARGET ${target} APPEND PROPERTY - _qt_android_deployment_files "${out_file}" "${out_file}.tmp") + _qt_android_deployment_files "${out_file}" "${temporary_file}") endfunction() # Generates the top-level gradle.properties in the android-build directory |
