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 <eskil.abrahamsen-blomfeldt@qt.io>
This commit is contained in:
BogDan Vatra 2019-08-27 12:42:29 +03:00
parent c9f8893000
commit 162e23d838

View File

@ -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
}