aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2018-12-05 13:00:36 +0100
committerhjk <hjk@qt.io>2019-01-16 11:00:45 +0000
commitd52af488830b48a8fa699ff71b85466887847df8 (patch)
tree7933c1bba0adce4d34ac28f2a45304d4f0ca0655 /src
parenta2d5ebccd2d28d339eda18d0d5c0ebbe698e381c (diff)
QmakeAndroidSupport: Remove plugin
The remaining dependency is hacked into QmakeProjectManager by using a compile time-only dependency on androidconstants.h. Change-Id: Id78125137bc75c145a072bc753276abbf0029647 Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/android/androidbuildapkstep.cpp6
-rw-r--r--src/plugins/android/androidconstants.h1
-rw-r--r--src/plugins/android/androiddebugsupport.cpp3
-rw-r--r--src/plugins/android/androidmanager.cpp5
-rw-r--r--src/plugins/android/androidmanager.h2
-rw-r--r--src/plugins/android/androidplugin.cpp33
-rw-r--r--src/plugins/android/androidqtversion.cpp8
-rw-r--r--src/plugins/plugins.pro1
-rw-r--r--src/plugins/plugins.qbs1
-rw-r--r--src/plugins/qmakeandroidsupport/QmakeAndroidSupport.json.in20
-rw-r--r--src/plugins/qmakeandroidsupport/androidqmakebuildconfigurationfactory.cpp86
-rw-r--r--src/plugins/qmakeandroidsupport/androidqmakebuildconfigurationfactory.h51
-rw-r--r--src/plugins/qmakeandroidsupport/qmakeandroidsupport.pro13
-rw-r--r--src/plugins/qmakeandroidsupport/qmakeandroidsupport.qbs24
-rw-r--r--src/plugins/qmakeandroidsupport/qmakeandroidsupport_dependencies.pri15
-rw-r--r--src/plugins/qmakeandroidsupport/qmakeandroidsupportplugin.cpp55
-rw-r--r--src/plugins/qmakeandroidsupport/qmakeandroidsupportplugin.h50
-rw-r--r--src/plugins/qmakeprojectmanager/qmakebuildconfiguration.cpp10
18 files changed, 55 insertions, 329 deletions
diff --git a/src/plugins/android/androidbuildapkstep.cpp b/src/plugins/android/androidbuildapkstep.cpp
index 1afe920f540..5952e8a80e4 100644
--- a/src/plugins/android/androidbuildapkstep.cpp
+++ b/src/plugins/android/androidbuildapkstep.cpp
@@ -76,8 +76,6 @@ Q_LOGGING_CATEGORY(buildapkstepLog, "qtc.android.build.androidbuildapkstep", QtW
namespace Android {
-const Core::Id ANDROID_BUILD_APK_ID("QmakeProjectManager.AndroidBuildApkStep");
-
const QVersionNumber gradleScriptRevokedSdkVersion(25, 3, 0);
const char KeystoreLocationKey[] = "KeystoreLocation";
const char BuildTargetSdkKey[] = "BuildTargetSdk";
@@ -126,7 +124,7 @@ private:
};
AndroidBuildApkStep::AndroidBuildApkStep(BuildStepList *parent)
- : AbstractProcessStep(parent, ANDROID_BUILD_APK_ID),
+ : AbstractProcessStep(parent, Constants::ANDROID_BUILD_APK_ID),
m_buildTargetSdk(AndroidConfig::apiLevelNameFor(AndroidConfigurations::
sdkManager()->latestAndroidSdkPlatform()))
{
@@ -559,7 +557,7 @@ namespace Internal {
AndroidBuildApkStepFactory::AndroidBuildApkStepFactory()
{
- registerStep<AndroidBuildApkStep>(ANDROID_BUILD_APK_ID);
+ registerStep<AndroidBuildApkStep>(Constants::ANDROID_BUILD_APK_ID);
setSupportedProjectType(QmakeProjectManager::Constants::QMAKEPROJECT_ID);
setSupportedDeviceType(Constants::ANDROID_DEVICE_TYPE);
setSupportedStepList(ProjectExplorer::Constants::BUILDSTEPS_BUILD);
diff --git a/src/plugins/android/androidconstants.h b/src/plugins/android/androidconstants.h
index 38d6291ae9a..ee2630c1987 100644
--- a/src/plugins/android/androidconstants.h
+++ b/src/plugins/android/androidconstants.h
@@ -73,6 +73,7 @@ const char ANDROID_EXTRA_LIBS[] = "AndroidExtraLibs";
const char ANDROID_PACKAGENAME[] = "Android.PackageName";
const char ANDROID_PACKAGE_INSTALLATION_STEP_ID[] = "Qt4ProjectManager.AndroidPackageInstallationStep";
+const char ANDROID_BUILD_APK_ID[] = "QmakeProjectManager.AndroidBuildApkStep";
const char AndroidPackageSourceDir[] = "AndroidPackageSourceDir"; // QString
const char AndroidDeploySettingsFile[] = "AndroidDeploySettingsFile"; // QString
diff --git a/src/plugins/android/androiddebugsupport.cpp b/src/plugins/android/androiddebugsupport.cpp
index 5d7a48754b8..2af97bdffd7 100644
--- a/src/plugins/android/androiddebugsupport.cpp
+++ b/src/plugins/android/androiddebugsupport.cpp
@@ -186,7 +186,8 @@ void AndroidDebugSupport::start()
gdbServer.setPort(m_runner->gdbServerPort().number());
setRemoteChannel(gdbServer);
- int sdkVersion = qMax(AndroidManager::minimumSDK(target), AndroidManager::minimumNDK(target));
+ int sdkVersion = qMax(AndroidManager::minimumSDK(target->kit()),
+ AndroidManager::minimumNDK(target->kit()));
Utils::FileName sysRoot = AndroidConfigurations::currentConfig().ndkLocation()
.appendPath("platforms")
.appendPath(QString("android-%1").arg(sdkVersion))
diff --git a/src/plugins/android/androidmanager.cpp b/src/plugins/android/androidmanager.cpp
index f7fa07a842b..8ab121e93cf 100644
--- a/src/plugins/android/androidmanager.cpp
+++ b/src/plugins/android/androidmanager.cpp
@@ -247,10 +247,9 @@ int AndroidManager::minimumSDK(const ProjectExplorer::Kit *kit)
return minSDKVersion;
}
-int AndroidManager::minimumNDK(ProjectExplorer::Target *target)
+int AndroidManager::minimumNDK(const Kit *kit)
{
- auto qt = static_cast<Android::Internal::AndroidQtVersion *>(
- QtSupport::QtKitInformation::qtVersion(target->kit()));
+ auto qt = static_cast<AndroidQtVersion *>(QtSupport::QtKitInformation::qtVersion(kit));
return qt->mininmumNDK();
}
diff --git a/src/plugins/android/androidmanager.h b/src/plugins/android/androidmanager.h
index 25ccfa50954..303f9800457 100644
--- a/src/plugins/android/androidmanager.h
+++ b/src/plugins/android/androidmanager.h
@@ -89,7 +89,7 @@ public:
static int minimumSDK(ProjectExplorer::Target *target);
static int minimumSDK(const ProjectExplorer::Kit *kit);
- static int minimumNDK(ProjectExplorer::Target *target);
+ static int minimumNDK(const ProjectExplorer::Kit *kit);
static QString targetArch(ProjectExplorer::Target *target);
diff --git a/src/plugins/android/androidplugin.cpp b/src/plugins/android/androidplugin.cpp
index 70d247476d6..7fdb28cad52 100644
--- a/src/plugins/android/androidplugin.cpp
+++ b/src/plugins/android/androidplugin.cpp
@@ -50,8 +50,11 @@
#endif
#include <projectexplorer/devicesupport/devicemanager.h>
+#include <projectexplorer/buildconfiguration.h>
#include <projectexplorer/kitinformation.h>
#include <projectexplorer/kitmanager.h>
+#include <projectexplorer/project.h>
+#include <projectexplorer/session.h>
#include <projectexplorer/target.h>
#include <qtsupport/qtversionmanager.h>
@@ -77,9 +80,37 @@ public:
}
};
-class AndroidPluginPrivate
+class AndroidPluginPrivate : public QObject
{
public:
+ AndroidPluginPrivate()
+ {
+ connect(SessionManager::instance(), &SessionManager::projectAdded, this, [=](Project *project) {
+ for (Target *target : project->targets())
+ handleNewTarget(target);
+ connect(project, &Project::addedTarget, this, &AndroidPluginPrivate::handleNewTarget);
+ });
+ }
+
+ void handleNewTarget(Target *target)
+ {
+ if (DeviceTypeKitInformation::deviceTypeId(target->kit()) != Android::Constants::ANDROID_DEVICE_TYPE)
+ return;
+
+ for (BuildConfiguration *bc : target->buildConfigurations())
+ handleNewBuildConfiguration(bc);
+
+ connect(target, &Target::addedBuildConfiguration,
+ this, &AndroidPluginPrivate::handleNewBuildConfiguration);
+ }
+
+ void handleNewBuildConfiguration(BuildConfiguration *bc)
+ {
+ connect(bc->target()->project(), &Project::parsingFinished, bc, [bc] {
+ AndroidManager::updateGradleProperties(bc->target());
+ });
+ }
+
AndroidConfigurations androidConfiguration;
AndroidSettingsPage settingsPage;
AndroidDeployQtStepFactory deployQtStepFactory;
diff --git a/src/plugins/android/androidqtversion.cpp b/src/plugins/android/androidqtversion.cpp
index a1a6d047bab..9916fc1deb2 100644
--- a/src/plugins/android/androidqtversion.cpp
+++ b/src/plugins/android/androidqtversion.cpp
@@ -98,10 +98,12 @@ QList<Abi> AndroidQtVersion::detectQtAbis() const
void AndroidQtVersion::addToEnvironment(const Kit *k, Utils::Environment &env) const
{
- Q_UNUSED(k);
+ const AndroidConfig &config =AndroidConfigurations::currentConfig();
// this env vars are used by qmake mkspecs to generate makefiles (check QTDIR/mkspecs/android-g++/qmake.conf for more info)
- env.set(QLatin1String("ANDROID_NDK_HOST"), AndroidConfigurations::currentConfig().toolchainHost());
- env.set(QLatin1String("ANDROID_NDK_ROOT"), AndroidConfigurations::currentConfig().ndkLocation().toUserOutput());
+ env.set(QLatin1String("ANDROID_NDK_HOST"), config.toolchainHost());
+ env.set(QLatin1String("ANDROID_NDK_ROOT"), config.ndkLocation().toUserOutput());
+ env.set(QLatin1String("ANDROID_NDK_PLATFORM"),
+ config.bestNdkPlatformMatch(qMax(AndroidManager::minimumNDK(k), AndroidManager::minimumSDK(k))));
}
Utils::Environment AndroidQtVersion::qmakeRunEnvironment() const
diff --git a/src/plugins/plugins.pro b/src/plugins/plugins.pro
index cc8909d8ba4..d5ff8710289 100644
--- a/src/plugins/plugins.pro
+++ b/src/plugins/plugins.pro
@@ -51,7 +51,6 @@ SUBDIRS = \
ios \
beautifier \
modeleditor \
- qmakeandroidsupport \
winrt \
updateinfo \
scxmleditor \
diff --git a/src/plugins/plugins.qbs b/src/plugins/plugins.qbs
index 26f337820da..3f8ca169860 100644
--- a/src/plugins/plugins.qbs
+++ b/src/plugins/plugins.qbs
@@ -51,7 +51,6 @@ Project {
"perfprofiler/perfprofiler.qbs",
"projectexplorer/projectexplorer.qbs",
"qbsprojectmanager/qbsprojectmanager.qbs",
- "qmakeandroidsupport",
"pythoneditor/pythoneditor.qbs",
"qmldesigner/qmldesigner.qbs",
"qmljseditor/qmljseditor.qbs",
diff --git a/src/plugins/qmakeandroidsupport/QmakeAndroidSupport.json.in b/src/plugins/qmakeandroidsupport/QmakeAndroidSupport.json.in
deleted file mode 100644
index da5b46865b8..00000000000
--- a/src/plugins/qmakeandroidsupport/QmakeAndroidSupport.json.in
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- \"Name\" : \"QmakeAndroidSupport\",
- \"Version\" : \"$$QTCREATOR_VERSION\",
- \"CompatVersion\" : \"$$QTCREATOR_COMPAT_VERSION\",
- \"HiddenByDefault\" : true,
- \"Vendor\" : \"The Qt Company Ltd\",
- \"Copyright\" : \"(C) $$QTCREATOR_COPYRIGHT_YEAR The Qt Company Ltd\",
- \"License\" : [ \"Commercial Usage\",
- \"\",
- \"Licensees holding valid Qt Commercial licenses may use this plugin in accordance with the Qt Commercial License Agreement provided with the Software or, alternatively, in accordance with the terms contained in a written agreement between you and The Qt Company.\",
- \"\",
- \"GNU General Public License Usage\",
- \"\",
- \"Alternatively, this plugin may be used under the terms of the GNU General Public License version 3 as published by the Free Software Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT included in the packaging of this plugin. Please review the following information to ensure the GNU General Public License requirements will be met: https://www.gnu.org/licenses/gpl-3.0.html.\"
- ],
- \"Category\" : \"Build Systems\",
- \"Description\" : \"Android support for qmake project manager.\",
- \"Url\" : \"http://www.qt.io\",
- $$dependencyList
-}
diff --git a/src/plugins/qmakeandroidsupport/androidqmakebuildconfigurationfactory.cpp b/src/plugins/qmakeandroidsupport/androidqmakebuildconfigurationfactory.cpp
deleted file mode 100644
index f32330916d0..00000000000
--- a/src/plugins/qmakeandroidsupport/androidqmakebuildconfigurationfactory.cpp
+++ /dev/null
@@ -1,86 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt Creator.
-**
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-****************************************************************************/
-
-#include "androidqmakebuildconfigurationfactory.h"
-
-#include <android/androidbuildapkstep.h>
-#include <android/androidconfigurations.h>
-#include <android/androidconstants.h>
-#include <android/androidmanager.h>
-#include <android/androidpackageinstallationstep.h>
-
-#include <projectexplorer/buildsteplist.h>
-#include <projectexplorer/project.h>
-#include <projectexplorer/projectexplorerconstants.h>
-#include <projectexplorer/target.h>
-
-#include <qmakeprojectmanager/qmakeprojectmanagerconstants.h>
-
-using namespace Android;
-using namespace ProjectExplorer;
-
-namespace QmakeAndroidSupport {
-namespace Internal {
-
-// AndroidQmakeBuildConfigurationFactory
-
-AndroidQmakeBuildConfigurationFactory::AndroidQmakeBuildConfigurationFactory()
-{
- registerBuildConfiguration<AndroidQmakeBuildConfiguration>(QmakeProjectManager::Constants::QMAKE_BC_ID);
- setSupportedTargetDeviceTypes({Android::Constants::ANDROID_DEVICE_TYPE});
- setBasePriority(1);
-}
-
-// AndroidQmakeBuildConfiguration
-
-AndroidQmakeBuildConfiguration::AndroidQmakeBuildConfiguration(Target *target, Core::Id id)
- : QmakeBuildConfiguration(target, id)
-{
- updateCacheAndEmitEnvironmentChanged();
- connect(target->project(), &Project::parsingFinished, this, [this] {
- AndroidManager::updateGradleProperties(BuildConfiguration::target());
- });
-}
-
-void AndroidQmakeBuildConfiguration::initialize(const BuildInfo *info)
-{
- QmakeBuildConfiguration::initialize(info);
-
- BuildStepList *buildSteps = stepList(ProjectExplorer::Constants::BUILDSTEPS_BUILD);
- buildSteps->appendStep(new AndroidPackageInstallationStep(buildSteps));
- buildSteps->appendStep(new Android::AndroidBuildApkStep(buildSteps));
-
- updateCacheAndEmitEnvironmentChanged();
-}
-
-void AndroidQmakeBuildConfiguration::addToEnvironment(Utils::Environment &env) const
-{
- QString androidNdkPlatform = AndroidConfigurations::currentConfig().bestNdkPlatformMatch(
- qMax(AndroidManager::minimumNDK(target()), AndroidManager::minimumSDK(target())));
- env.set(QLatin1String("ANDROID_NDK_PLATFORM"), androidNdkPlatform);
-}
-
-} // namespace Internal
-} // namespace QmakeAndroidSupport
diff --git a/src/plugins/qmakeandroidsupport/androidqmakebuildconfigurationfactory.h b/src/plugins/qmakeandroidsupport/androidqmakebuildconfigurationfactory.h
deleted file mode 100644
index 361cf9b80dc..00000000000
--- a/src/plugins/qmakeandroidsupport/androidqmakebuildconfigurationfactory.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt Creator.
-**
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-****************************************************************************/
-
-#pragma once
-
-#include <qmakeprojectmanager/qmakebuildconfiguration.h>
-
-namespace QmakeAndroidSupport {
-namespace Internal {
-
-class AndroidQmakeBuildConfigurationFactory : public QmakeProjectManager::QmakeBuildConfigurationFactory
-{
-public:
- AndroidQmakeBuildConfigurationFactory();
-};
-
-class AndroidQmakeBuildConfiguration : public QmakeProjectManager::QmakeBuildConfiguration
-{
- Q_OBJECT
-
-public:
- AndroidQmakeBuildConfiguration(ProjectExplorer::Target *target, Core::Id id);
-
- void initialize(const ProjectExplorer::BuildInfo *info) override;
- void addToEnvironment(Utils::Environment &env) const override;
-};
-
-} // namespace Internal
-} // namespace QmakeAndroidSupport
diff --git a/src/plugins/qmakeandroidsupport/qmakeandroidsupport.pro b/src/plugins/qmakeandroidsupport/qmakeandroidsupport.pro
deleted file mode 100644
index 88731ade875..00000000000
--- a/src/plugins/qmakeandroidsupport/qmakeandroidsupport.pro
+++ /dev/null
@@ -1,13 +0,0 @@
-QT += network
-include(../../qtcreatorplugin.pri)
-
-DEFINES += \
- QMAKEANDROID_LIBRARY
-
-HEADERS += \
- androidqmakebuildconfigurationfactory.h \
- qmakeandroidsupportplugin.h
-
-SOURCES += \
- androidqmakebuildconfigurationfactory.cpp \
- qmakeandroidsupportplugin.cpp
diff --git a/src/plugins/qmakeandroidsupport/qmakeandroidsupport.qbs b/src/plugins/qmakeandroidsupport/qmakeandroidsupport.qbs
deleted file mode 100644
index 81f06b20cc8..00000000000
--- a/src/plugins/qmakeandroidsupport/qmakeandroidsupport.qbs
+++ /dev/null
@@ -1,24 +0,0 @@
-import qbs
-
-QtcPlugin {
- name: "QmakeAndroidSupport"
- Depends { name: "Android" }
- Depends { name: "Core" }
- Depends { name: "CppTools" }
- Depends { name: "ProjectExplorer" }
- Depends { name: "QmakeProjectManager" }
- Depends { name: "QmlJS" }
- Depends { name: "QmlJSTools" }
- Depends { name: "QtSupport" }
- Depends { name: "ResourceEditor" }
- Depends { name: "Utils" }
- Depends { name: "Qt.network" }
- Depends { name: "Qt.widgets" }
-
- files: [
- "androidqmakebuildconfigurationfactory.cpp",
- "androidqmakebuildconfigurationfactory.h",
- "qmakeandroidsupportplugin.h",
- "qmakeandroidsupportplugin.cpp",
- ]
-}
diff --git a/src/plugins/qmakeandroidsupport/qmakeandroidsupport_dependencies.pri b/src/plugins/qmakeandroidsupport/qmakeandroidsupport_dependencies.pri
deleted file mode 100644
index 08c57f8fcf0..00000000000
--- a/src/plugins/qmakeandroidsupport/qmakeandroidsupport_dependencies.pri
+++ /dev/null
@@ -1,15 +0,0 @@
-QTC_PLUGIN_NAME = QmakeAndroidSupport
-QTC_LIB_DEPENDS += \
- extensionsystem \
- qmljs \
- utils
-QTC_PLUGIN_DEPENDS += \
- coreplugin \
- projectexplorer \
- qtsupport \
- texteditor \
- cpptools \
- qmljstools \
- resourceeditor \
- android \
- qmakeprojectmanager
diff --git a/src/plugins/qmakeandroidsupport/qmakeandroidsupportplugin.cpp b/src/plugins/qmakeandroidsupport/qmakeandroidsupportplugin.cpp
deleted file mode 100644
index 1959bae698d..00000000000
--- a/src/plugins/qmakeandroidsupport/qmakeandroidsupportplugin.cpp
+++ /dev/null
@@ -1,55 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt Creator.
-**
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-****************************************************************************/
-
-#include "qmakeandroidsupportplugin.h"
-
-#include "androidqmakebuildconfigurationfactory.h"
-
-using namespace ProjectExplorer;
-
-namespace QmakeAndroidSupport {
-namespace Internal {
-
-class QmakeAndroidSupportPluginPrivate
-{
-public:
- AndroidQmakeBuildConfigurationFactory buildConfigFactory;
-};
-
-QmakeAndroidSupportPlugin::~QmakeAndroidSupportPlugin()
-{
- delete d;
-}
-
-bool QmakeAndroidSupportPlugin::initialize(const QStringList &arguments, QString *errorMessage)
-{
- Q_UNUSED(arguments)
- Q_UNUSED(errorMessage)
- d = new QmakeAndroidSupportPluginPrivate;
- return true;
-}
-
-} // Internal
-} // QmakeAndroidSupport
diff --git a/src/plugins/qmakeandroidsupport/qmakeandroidsupportplugin.h b/src/plugins/qmakeandroidsupport/qmakeandroidsupportplugin.h
deleted file mode 100644
index 9383d1aceef..00000000000
--- a/src/plugins/qmakeandroidsupport/qmakeandroidsupportplugin.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt Creator.
-**
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-****************************************************************************/
-
-#pragma once
-
-#include <extensionsystem/iplugin.h>
-
-namespace QmakeAndroidSupport {
-namespace Internal {
-
-class QmakeAndroidSupportPlugin : public ExtensionSystem::IPlugin
-{
- Q_OBJECT
- Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QtCreatorPlugin" FILE "QmakeAndroidSupport.json")
-
-public:
- QmakeAndroidSupportPlugin() = default;
- ~QmakeAndroidSupportPlugin() final;
-
-private:
- bool initialize(const QStringList &arguments, QString *errorMessage) final;
- void extensionsInitialized() final {}
-
- class QmakeAndroidSupportPluginPrivate *d = nullptr;
-};
-
-} // namespace Internal
-} // namespace QmakeAndroidSupport
diff --git a/src/plugins/qmakeprojectmanager/qmakebuildconfiguration.cpp b/src/plugins/qmakeprojectmanager/qmakebuildconfiguration.cpp
index 6dcb96a8817..25e1f8486c5 100644
--- a/src/plugins/qmakeprojectmanager/qmakebuildconfiguration.cpp
+++ b/src/plugins/qmakeprojectmanager/qmakebuildconfiguration.cpp
@@ -34,6 +34,9 @@
#include "qmakestep.h"
#include "qmakemakestep.h"
#include "makefileparse.h"
+#include "qmakebuildconfiguration.h"
+
+#include <android/androidconstants.h>
#include <coreplugin/documentmanager.h>
#include <coreplugin/icore.h>
@@ -160,6 +163,13 @@ void QmakeBuildConfiguration::initialize(const BuildInfo *info)
}
setBuildDirectory(directory);
+
+ if (DeviceTypeKitInformation::deviceTypeId(target()->kit())
+ == Android::Constants::ANDROID_DEVICE_TYPE) {
+ buildSteps->appendStep(Android::Constants::ANDROID_PACKAGE_INSTALLATION_STEP_ID);
+ buildSteps->appendStep(Android::Constants::ANDROID_BUILD_APK_ID);
+ }
+
updateCacheAndEmitEnvironmentChanged();
}