From e130e492ebe6ad266a74df7b7d5efdef55dc0ff7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Cotty?= Date: Mon, 20 Jan 2020 15:22:11 +0100 Subject: Android: Update support to qt 5.14 and multi-arch apks for Qt apps Before qt 5.14. The profile property "moduleProviders.Qt.qmakeFilePaths" is set with one or more paths to the different android architectures. Each qmake path belongs to a different android architecture installation. So each qmake is used to generated the Qt module corresponding to the architecture. Although qbs can generate multi-arch apks using multiplex mode, this is not possible when the project depends on qt libraries. This is because of the restriction of the qt tool androiddeployqt used by qbs. Now with qt 5.14. All android architectures are installed in the same directory. So the profile property "moduleProviders.Qt.qmakeFilePaths" is set with one qmake path. This directly impacts the qbs-setup-android tool and the generation of the Qt modules. Because qt libraries are installed in the the same directory, they have the abi in their name (libQt5Core_armeabi-v7a.so). So the rules that generate the apks are also impacted. The new androiddeployqt have a new interface (json config file format and requires to have the input libraries installed in the deployment directory) which allows the generation of multi-arch apks. So Qt.android_support modules needs to be updated as well. Fixes: QBS-1497 Change-Id: Ibd546f356c38a05f42dfcac0a4ec92bd82d6f700 Reviewed-by: Christian Kandeler --- scripts/test-qt-for-android.sh | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) (limited to 'scripts') diff --git a/scripts/test-qt-for-android.sh b/scripts/test-qt-for-android.sh index 877afbc30..44a64db21 100755 --- a/scripts/test-qt-for-android.sh +++ b/scripts/test-qt-for-android.sh @@ -50,16 +50,33 @@ echo "Android SDK installed at ${ANDROID_SDK_ROOT}" echo "Android NDK installed at ${ANDROID_NDK_ROOT}" echo "Qt installed at ${QT_INSTALL_DIR}" +# Cleaning profiles +qbs config --unset profiles.qbs_autotests-android +qbs config --unset profiles.qbs_autotests-android-qt + +# Setting auto test profiles qbs setup-android --ndk-dir ${ANDROID_HOME}/ndk-bundle --sdk-dir ${ANDROID_HOME} qbs_autotests-android qbs setup-android --ndk-dir ${ANDROID_HOME}/ndk-bundle --sdk-dir ${ANDROID_HOME} --qt-dir ${QT_INSTALL_DIR} qbs_autotests-android-qt +export QBS_AUTOTEST_PROFILE=qbs_autotests-android +export QBS_AUTOTEST_ALWAYS_LOG_STDERR=true + +if [ ! "${QT_VERSION}" \< "5.14.0" ]; then + echo "Using multi-arch data sets for qml tests (only for qt version >= 5.14) with all architectures" + qbs config --list + tst_blackbox-android + + echo "Using multi-arch data sets for qml tests (only for qt version >= 5.14) with only armv7a and x86_64" + qbs config profiles.qbs_autotests-android-qt.qbs.architectures '["armv7a","x86_64"]' + qbs config --list + tst_blackbox-android +fi; + +echo "Using single-arch (armv7a) data sets for qml tests" qbs config --unset profiles.qbs_autotests-android-qt.qbs.architectures qbs config profiles.qbs_autotests-android-qt.qbs.architecture armv7a qbs config --list -export QBS_AUTOTEST_PROFILE=qbs_autotests-android -export QBS_AUTOTEST_ALWAYS_LOG_STDERR=true - tst_blackbox-android -- cgit v1.2.3