Commit 21a5766c authored by Daniel Teske's avatar Daniel Teske
Browse files

Android: Handle library building in a more user friendly way

Task-number: QTCREATORBUG-13566
Change-Id: I47bf76d1f559bf1addae0e3d577e0207b4de4150
Reviewed-by: default avatarBogDan Vatra <>
parent 6339ddfc
......@@ -205,6 +205,10 @@ bool QmakeAndroidBuildApkStep::init()
QString outputDir = bc->buildDirectory().appendPath(QLatin1String(Constants::ANDROID_BUILDDIRECTORY)).toString();
const auto *pro = static_cast<QmakeProjectManager::QmakeProject *>(project());
m_skipBuilding = m_proFilePathForInputFile.isEmpty();
if (m_skipBuilding)
return true;
const QmakeProjectManager::QmakeProFileNode *node = pro->rootQmakeProjectNode()->findProFileFor(m_proFilePathForInputFile);
if (!node) { // should never happen
emit addOutput(tr("Internal Error: Could not find .pro file."), BuildStep::ErrorMessageOutput);
......@@ -270,6 +274,17 @@ bool QmakeAndroidBuildApkStep::init()
return true;
void QmakeAndroidBuildApkStep::run(QFutureInterface<bool> &fi)
if (m_skipBuilding) {
emit addOutput(tr("No application .pro file found, not building an APK."), BuildStep::ErrorMessageOutput);
emit finished();
void QmakeAndroidBuildApkStep::setupProcessParameters(ProjectExplorer::ProcessParameters *pp,
ProjectExplorer::BuildConfiguration *bc,
const QStringList &arguments,
......@@ -69,6 +69,7 @@ public:
QString proFilePathForInputFile() const;
void setProFilePathForInputFile(const QString &path);
friend class QmakeAndroidBuildApkStepFactory;
QmakeAndroidBuildApkStep(ProjectExplorer::BuildStepList *bc,
......@@ -79,6 +80,7 @@ protected:
void ctor();
bool init();
void run(QFutureInterface<bool> &fi);
void processStarted();
ProjectExplorer::BuildStepConfigWidget *createConfigWidget();
bool fromMap(const QVariantMap &map);
......@@ -98,6 +100,7 @@ private:
QString m_proFilePathForInputFile;
QString m_command;
QString m_argumentsPasswordConcealed;
bool m_skipBuilding;
} // namespace Internal
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment