From 162e23d838101ddcd8e6416dd346465ac20bd05d Mon Sep 17 00:00:00 2001 From: BogDan Vatra Date: Tue, 27 Aug 2019 12:42:29 +0300 Subject: [PATCH] Android: Add aab target Move aab, apk, apk_install_target to !build_pass, otherwise these targets will be executed for each android abi. Change-Id: I18f6c8946f503f2c08338f24758bf9059987fe0f Reviewed-by: Eskil Abrahamsen Blomfeldt --- mkspecs/features/android/android.prf | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/mkspecs/features/android/android.prf b/mkspecs/features/android/android.prf index a12c17c4ed..fc0ff553d0 100644 --- a/mkspecs/features/android/android.prf +++ b/mkspecs/features/android/android.prf @@ -4,17 +4,22 @@ APK_PATH = $$shell_path($$OUT_PWD/android-build/$${TARGET}.apk) apk_install_target.depends = first apk_install_target.commands = $(MAKE) -f $(MAKEFILE) INSTALL_ROOT=$$OUT_PWD/android-build install - apk.target = apk - apk.depends = apk_install_target qtPrepareTool(ANDROIDDEPLOYQT, androiddeployqt) isEmpty(ANDROID_DEPLOYMENT_SETTINGS_FILE): ANDROID_DEPLOYMENT_SETTINGS_FILE = $$OUT_PWD/android-$$TARGET-deployment-settings.json contains(QMAKE_HOST.os, Windows): extension = .exe + + apk.target = apk + apk.depends = apk_install_target apk.commands = $$ANDROIDDEPLOYQT --input $$ANDROID_DEPLOYMENT_SETTINGS_FILE --output $$OUT_PWD/android-build --apk $$APK_PATH + + aab.target = aab + aab.depends = apk_install_target + aab.commands = $$ANDROIDDEPLOYQT --input $$ANDROID_DEPLOYMENT_SETTINGS_FILE --output $$OUT_PWD/android-build --aab --apk $$APK_PATH } else { + prepareRecursiveTarget(aab) prepareRecursiveTarget(apk) prepareRecursiveTarget(apk_install_target) } -QMAKE_EXTRA_TARGETS *= apk apk_install_target build_pass { contains(TEMPLATE, ".*app") { @@ -34,4 +39,11 @@ build_pass { target.path = /libs/$$ANDROID_TARGET_ARCH/ INSTALLS *= target } +} else { + QMAKE_EXTRA_TARGETS *= aab apk apk_install_target + + android-build-distclean.commands = \ + $$QMAKE_DEL_TREE $$shell_quote($$shell_path($$OUT_PWD/android-build)) + QMAKE_EXTRA_TARGETS *= android-build-distclean + CLEAN_DEPS += android-build-distclean }