diff options
author | Raphael Cotty <raphael.cotty@gmail.com> | 2021-10-24 20:36:27 +0200 |
---|---|---|
committer | Raphaƫl Cotty <raphael.cotty@gmail.com> | 2021-10-25 05:15:47 +0000 |
commit | eef202e5edd0a9d149433ce93105049a3e54fcf0 (patch) | |
tree | 9ed9abd22e2435729186cf7a453498d1ba5801f5 | |
parent | 34233e45f9c3a1273f507395c8675836297fab08 (diff) | |
download | qbs-eef202e5edd0a9d149433ce93105049a3e54fcf0.tar.gz |
Android: Add android image for Qt 6.2
Change-Id: Ib48209643b755954f0f38c3f1bcfb487e23cf292
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
-rw-r--r-- | .github/workflows/main.yml | 6 | ||||
-rw-r--r-- | docker-compose.yml | 11 | ||||
-rw-r--r-- | docker/focal/test-android.Dockerfile | 6 | ||||
-rw-r--r-- | tests/auto/blackbox/testdata-android/qml-app/src/main/AndroidManifest.xml | 3 | ||||
-rw-r--r-- | tests/auto/blackbox/tst_blackboxandroid.cpp | 57 |
5 files changed, 70 insertions, 13 deletions
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 73808a7a0..88e0bf13c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -353,6 +353,12 @@ jobs: script: './scripts/test-qt-for-android.sh', } - { + name: 'Run Android tests (Qt 6.2.0)', + image: 'focal-android-620', + profile: '', + script: './scripts/test-qt-for-android.sh', + } + - { name: 'Run Android tests (ndk r19c)', image: 'focal-android-ndk-r19c', profile: '', diff --git a/docker-compose.yml b/docker-compose.yml index 77a79f2b1..315330dbc 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -84,6 +84,17 @@ services: QT_VERSION: 6.0.0 ANDROID_NDK_VERSION: 23.0.7599858 + focal-android-620: + << : *linux + hostname: focal-android + image: ${DOCKER_USER:-qbsbuild}/qbsdev:focal-android-6.2.0-0 + build: + dockerfile: docker/focal/test-android.Dockerfile + context: . + args: + QT_VERSION: 6.2.0 + ANDROID_NDK_VERSION: 23.0.7599858 + focal-android-ndk-r19c: << : *linux hostname: focal-android diff --git a/docker/focal/test-android.Dockerfile b/docker/focal/test-android.Dockerfile index ca7223593..4f48dcf3f 100644 --- a/docker/focal/test-android.Dockerfile +++ b/docker/focal/test-android.Dockerfile @@ -115,7 +115,11 @@ RUN if [ "${QT_VERSION}" \< "5.14" ] || [ ! "${QT_VERSION}" \< "6.0.0" ]; then \ fi; \ if [ ! "${QT_VERSION}" \< "6.0.0" ]; then \ ./install-qt.sh --version ${QT_VERSION} qtbase qtdeclarative icu; \ - QT_COMPONENTS="qtbase qtdeclarative qttools qtquickcontrols2 qtquicktimeline"; \ + if [ "${QT_VERSION}" \< "6.1.0" ]; then \ + QT_COMPONENTS="qtbase qtdeclarative qttools qtquickcontrols2 qtquicktimeline svg"; \ + else \ + QT_COMPONENTS="qtbase qtdeclarative qttools qtquicktimeline svg"; \ + fi; \ else \ QT_COMPONENTS="qtbase qtdeclarative qttools qtimageformats"; \ fi; \ diff --git a/tests/auto/blackbox/testdata-android/qml-app/src/main/AndroidManifest.xml b/tests/auto/blackbox/testdata-android/qml-app/src/main/AndroidManifest.xml index 542794825..c8237c639 100644 --- a/tests/auto/blackbox/testdata-android/qml-app/src/main/AndroidManifest.xml +++ b/tests/auto/blackbox/testdata-android/qml-app/src/main/AndroidManifest.xml @@ -16,7 +16,6 @@ <!-- Application arguments --> <meta-data android:name="android.app.lib_name" android:value="-- %%INSERT_APP_LIB_NAME%% --"/> - <meta-data android:name="android.app.qt_sources_resource_id" android:resource="@array/qt_sources"/> <meta-data android:name="android.app.repository" android:value="default"/> <meta-data android:name="android.app.qt_libs_resource_id" android:resource="@array/qt_libs"/> <meta-data android:name="android.app.bundled_libs_resource_id" android:resource="@array/bundled_libs"/> @@ -31,8 +30,6 @@ <meta-data android:name="android.app.load_local_jars" android:value="-- %%INSERT_LOCAL_JARS%% --"/> <meta-data android:name="android.app.static_init_classes" android:value="-- %%INSERT_INIT_CLASSES%% --"/> <!-- Messages maps --> - <meta-data android:value="@string/ministro_not_found_msg" android:name="android.app.ministro_not_found_msg"/> - <meta-data android:value="@string/ministro_needed_msg" android:name="android.app.ministro_needed_msg"/> <meta-data android:value="@string/fatal_error_msg" android:name="android.app.fatal_error_msg"/> <!-- Messages maps --> diff --git a/tests/auto/blackbox/tst_blackboxandroid.cpp b/tests/auto/blackbox/tst_blackboxandroid.cpp index 0d66f60bb..684291eb1 100644 --- a/tests/auto/blackbox/tst_blackboxandroid.cpp +++ b/tests/auto/blackbox/tst_blackboxandroid.cpp @@ -524,7 +524,6 @@ void TestBlackboxAndroid::android_data() "modules.qbs.architecture:" + archsStringList.first(), aaptVersion(enableAapt2), packageType(generateAab)} << enableAapt2 << generateAab << isIncrementalBuild << enableD8; - auto qmlAppExpectedFiles = [&](bool generateAab, bool enableAapt2) { QByteArrayList expectedFile; if (singleArchQt) { @@ -614,7 +613,7 @@ void TestBlackboxAndroid::android_data() "lib/${ARCH}/libplugins_imageformats_qtiff_${ARCH}.so", "lib/${ARCH}/libplugins_imageformats_qwbmp_${ARCH}.so", "lib/${ARCH}/libplugins_imageformats_qwebp_${ARCH}.so"}, generateAab); - if (version >= qbs::Version(6, 0)) + if (version >= qbs::Version(6, 0)) { expectedFile << expandArchs(ndkArchsForQt, { "lib/${ARCH}/libQt6OpenGL_${ARCH}.so", "lib/${ARCH}/libQt6QuickControls2Impl_${ARCH}.so", @@ -627,8 +626,6 @@ void TestBlackboxAndroid::android_data() "lib/${ARCH}/libqml_QtQml_Models_modelsplugin_${ARCH}.so", "lib/${ARCH}/libqml_QtQml_WorkerScript_workerscriptplugin_${ARCH}.so", "lib/${ARCH}/libqml_QtQml_qmlplugin_${ARCH}.so", - "lib/${ARCH}/libqml_QtQuick_Window_quickwindow_${ARCH}.so", - "lib/${ARCH}/libqml_QtQuick_tooling_quicktooling_${ARCH}.so", "lib/${ARCH}/libqml_QtQuick_Controls_Basic_impl_qtquickcontrols2basicstyleimplplugin_${ARCH}.so", "lib/${ARCH}/libqml_QtQuick_Controls_Basic_qtquickcontrols2basicstyleplugin_${ARCH}.so", "lib/${ARCH}/libqml_QtQuick_Controls_Fusion_impl_qtquickcontrols2fusionstyleimplplugin_${ARCH}.so", @@ -649,6 +646,29 @@ void TestBlackboxAndroid::android_data() "lib/${ARCH}/libqml_QtQuick_Timeline_qtquicktimelineplugin_${ARCH}.so", "lib/${ARCH}/libqml_QtQuick_Layouts_qquicklayoutsplugin_${ARCH}.so", "lib/${ARCH}/libqml_QtQuick_qtquick2plugin_${ARCH}.so"}, generateAab); + if (version >= qbs::Version(6, 2)) + expectedFile << expandArchs(ndkArchsForQt, { + "lib/${ARCH}/libqml_QtQuick_Window_quickwindowplugin_${ARCH}.so", + "lib/${ARCH}/libqml_QtQuick_tooling_quicktoolingplugin_${ARCH}.so", + "lib/${ARCH}/libQt6QmlLocalStorage_${ARCH}.so", + "lib/${ARCH}/libQt6QmlXmlListModel_${ARCH}.so", + "lib/${ARCH}/libQt6QuickDialogs2QuickImpl_${ARCH}.so", + "lib/${ARCH}/libQt6QuickDialogs2Utils_${ARCH}.so", + "lib/${ARCH}/libQt6QuickDialogs2_${ARCH}.so", + "lib/${ARCH}/libQt6QuickLayouts_${ARCH}.so", + "lib/${ARCH}/libQt6QuickTimeline_${ARCH}.so", + "lib/${ARCH}/libplugins_networkinformation_qandroidnetworkinformation_${ARCH}.so", + "lib/${ARCH}/libplugins_tls_qcertonlybackend_${ARCH}.so", + "lib/${ARCH}/libplugins_tls_qopensslbackend_${ARCH}.so", + "lib/${ARCH}/libqml_QtQml_XmlListModel_qmlxmllistmodelplugin_${ARCH}.so", + "lib/${ARCH}/libqml_QtQuick_Dialogs_qtquickdialogsplugin_${ARCH}.so", + "lib/${ARCH}/libqml_QtQuick_Dialogs_quickimpl_qtquickdialogs2quickimplplugin_${ARCH}.so"}, + generateAab); + else + expectedFile << expandArchs(ndkArchsForQt, { + "lib/${ARCH}/libqml_QtQuick_Window_quickwindow_${ARCH}.so", + "lib/${ARCH}/libqml_QtQuick_tooling_quicktooling_${ARCH}.so"}, generateAab); + } } if (generateAab) expectedFile << "base/resources.pb" << "base/assets.pb" << "base/native.pb"; @@ -658,7 +678,6 @@ void TestBlackboxAndroid::android_data() expectedFile << "res/layout/splash.xml"; return expectedFile; }; - auto qmlAppCustomMetaDataExpectedFiles = [&](bool generateAab, bool enableAapt2) { QByteArrayList expectedFile; if (singleArchQt) { @@ -750,7 +769,7 @@ void TestBlackboxAndroid::android_data() "lib/${ARCH}/libplugins_imageformats_qtiff_${ARCH}.so", "lib/${ARCH}/libplugins_imageformats_qwbmp_${ARCH}.so", "lib/${ARCH}/libplugins_imageformats_qwebp_${ARCH}.so"}, generateAab); - if (version >= qbs::Version(6, 0)) + if (version >= qbs::Version(6, 0)) { expectedFile << expandArchs(ndkArchsForQt, { "lib/${ARCH}/libQt6OpenGL_${ARCH}.so", "lib/${ARCH}/libQt6QuickControls2Impl_${ARCH}.so", @@ -763,8 +782,6 @@ void TestBlackboxAndroid::android_data() "lib/${ARCH}/libqml_QtQml_Models_modelsplugin_${ARCH}.so", "lib/${ARCH}/libqml_QtQml_WorkerScript_workerscriptplugin_${ARCH}.so", "lib/${ARCH}/libqml_QtQml_qmlplugin_${ARCH}.so", - "lib/${ARCH}/libqml_QtQuick_Window_quickwindow_${ARCH}.so", - "lib/${ARCH}/libqml_QtQuick_tooling_quicktooling_${ARCH}.so", "lib/${ARCH}/libqml_QtQuick_Controls_Basic_impl_qtquickcontrols2basicstyleimplplugin_${ARCH}.so", "lib/${ARCH}/libqml_QtQuick_Controls_Basic_qtquickcontrols2basicstyleplugin_${ARCH}.so", "lib/${ARCH}/libqml_QtQuick_Controls_Fusion_impl_qtquickcontrols2fusionstyleimplplugin_${ARCH}.so", @@ -785,6 +802,29 @@ void TestBlackboxAndroid::android_data() "lib/${ARCH}/libqml_QtQuick_Timeline_qtquicktimelineplugin_${ARCH}.so", "lib/${ARCH}/libqml_QtQuick_Layouts_qquicklayoutsplugin_${ARCH}.so", "lib/${ARCH}/libqml_QtQuick_qtquick2plugin_${ARCH}.so"}, generateAab); + if (version >= qbs::Version(6, 2)) + expectedFile << expandArchs(ndkArchsForQt, { + "lib/${ARCH}/libqml_QtQuick_Window_quickwindowplugin_${ARCH}.so", + "lib/${ARCH}/libqml_QtQuick_tooling_quicktoolingplugin_${ARCH}.so", + "lib/${ARCH}/libQt6QmlLocalStorage_${ARCH}.so", + "lib/${ARCH}/libQt6QmlXmlListModel_${ARCH}.so", + "lib/${ARCH}/libQt6QuickDialogs2QuickImpl_${ARCH}.so", + "lib/${ARCH}/libQt6QuickDialogs2Utils_${ARCH}.so", + "lib/${ARCH}/libQt6QuickDialogs2_${ARCH}.so", + "lib/${ARCH}/libQt6QuickLayouts_${ARCH}.so", + "lib/${ARCH}/libQt6QuickTimeline_${ARCH}.so", + "lib/${ARCH}/libplugins_networkinformation_qandroidnetworkinformation_${ARCH}.so", + "lib/${ARCH}/libplugins_tls_qcertonlybackend_${ARCH}.so", + "lib/${ARCH}/libplugins_tls_qopensslbackend_${ARCH}.so", + "lib/${ARCH}/libqml_QtQml_XmlListModel_qmlxmllistmodelplugin_${ARCH}.so", + "lib/${ARCH}/libqml_QtQuick_Dialogs_qtquickdialogsplugin_${ARCH}.so", + "lib/${ARCH}/libqml_QtQuick_Dialogs_quickimpl_qtquickdialogs2quickimplplugin_${ARCH}.so"}, + generateAab); + else + expectedFile << expandArchs(ndkArchsForQt, { + "lib/${ARCH}/libqml_QtQuick_Window_quickwindow_${ARCH}.so", + "lib/${ARCH}/libqml_QtQuick_tooling_quicktooling_${ARCH}.so"}, generateAab); + } } if (generateAab) expectedFile << "base/resources.pb" << "base/assets.pb" << "base/native.pb"; @@ -817,7 +857,6 @@ void TestBlackboxAndroid::android_data() << (QStringList() << qmlAppCustomProperties << aaptVersion(enableAapt2) << packageType(generateAab)) << enableAapt2 << generateAab << isIncrementalBuild << enableD8; - enableAapt2 = true; QTest::newRow("qml app aapt2") << "qml-app" << QStringList("qmlapp") |