Android: Skip "Make Install" and "Build APK" if not ProductType::App

If the target's product type is not "App", the "Make Install" and "Build
Android APK" build steps need to be skipped.

Fixes: QTCREATORBUG-26980
Change-Id: Ia8bb61d407d040b851a74bad3d23876a7d31af73
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
This commit is contained in:
Alessandro Portale
2023-03-01 20:35:53 +01:00
parent d05faf64f4
commit 3eb60d80e5
4 changed files with 31 additions and 0 deletions

View File

@@ -711,6 +711,13 @@ void AndroidBuildApkStep::doRun()
return;
}
if (AndroidManager::skipInstallationAndPackageSteps(target())) {
reportWarningOrError(Tr::tr("Product type is not an application, not building an APK."),
Task::Warning);
emit finished(true);
return;
}
auto setup = [this] {
const auto androidAbis = AndroidManager::applicationAbis(target());
const QString buildKey = target()->activeBuildKey();