summaryrefslogtreecommitdiffstats
path: root/tests/auto/other
diff options
context:
space:
mode:
authorAssam Boudjelthia <assam.boudjelthia@qt.io>2024-05-10 14:45:50 +0300
committerAssam Boudjelthia <assam.boudjelthia@qt.io>2024-05-16 16:40:55 +0300
commitfbb35cdb0b2c302e5963900bf59bc91a7c21765a (patch)
treec99a1c62611cccdabe03e9d4c34d6476678a3f7a /tests/auto/other
parentc9ddc4b8e17fac10d2f25fe21c09bdd734513ac6 (diff)
Android:CMake: Add QT_ANDROID_PACKAGE_NAME property
Allow setting the package name directly from CMake properties. If the package name is not set manually under AndroidManifest.xml nor build.gradle, then the value set by this property is used. The value is passed to build.gradle as "namespace" which is the way to set the package name after AGP 7.4 instead of AndroidManifest.xml "package" attribute. Task-number: QTBUG-106907 Change-Id: I94bd73c294d751eabfd96c0a10a6b3ff270d8137 Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
Diffstat (limited to 'tests/auto/other')
-rw-r--r--tests/auto/other/android_deployment_settings/CMakeLists.txt2
-rw-r--r--tests/auto/other/android_deployment_settings/tst_android_deployment_settings.cpp2
2 files changed, 4 insertions, 0 deletions
diff --git a/tests/auto/other/android_deployment_settings/CMakeLists.txt b/tests/auto/other/android_deployment_settings/CMakeLists.txt
index f2ba135328..9ef457189a 100644
--- a/tests/auto/other/android_deployment_settings/CMakeLists.txt
+++ b/tests/auto/other/android_deployment_settings/CMakeLists.txt
@@ -30,6 +30,7 @@ set_target_properties(${target} PROPERTIES
QT_ANDROID_SDK_BUILD_TOOLS_REVISION "23.0.2"
QT_ANDROID_MIN_SDK_VERSION "1"
QT_ANDROID_TARGET_SDK_VERSION "2"
+ QT_ANDROID_PACKAGE_NAME "org.qtproject.android_deployment_settings_test"
QT_ANDROID_DEPLOYMENT_DEPENDENCIES "dep1.so;dep2.so;dep3.so"
QT_ANDROID_DEPLOYMENT_SETTINGS_FILE "attempt_to_rewrite.json"
QT_ANDROID_EXTRA_LIBS
@@ -53,6 +54,7 @@ set_target_properties(${target} PROPERTIES
QT_ANDROID_SDK_BUILD_TOOLS_REVISION "23.0.2"
QT_ANDROID_MIN_SDK_VERSION "1"
QT_ANDROID_TARGET_SDK_VERSION "2"
+ QT_ANDROID_PACKAGE_NAME "org.qtproject.android_deployment_settings_test"
QT_ANDROID_DEPLOYMENT_DEPENDENCIES "dep1.so;dep2.so;dep3.so"
QT_ANDROID_EXTRA_LIBS
"some/path/to/lib1.so;some/path\\to/lib2.so;some\\path\\to\\lib3.so;some/path/to/lib4.so"
diff --git a/tests/auto/other/android_deployment_settings/tst_android_deployment_settings.cpp b/tests/auto/other/android_deployment_settings/tst_android_deployment_settings.cpp
index d68d08b58e..f8428aaf43 100644
--- a/tests/auto/other/android_deployment_settings/tst_android_deployment_settings.cpp
+++ b/tests/auto/other/android_deployment_settings/tst_android_deployment_settings.cpp
@@ -76,6 +76,8 @@ void tst_android_deployment_settings::DeploymentSettings_data()
<< "1";
QTest::newRow("android-target-sdk-version") << "android-target-sdk-version"
<< "2";
+ QTest::newRow("android-package-name") << "android-package-name"
+ << "org.qtproject.android_deployment_settings_test";
}
void tst_android_deployment_settings::DeploymentSettings()