Android: Move CreateAndroidManifestWizard and related build step to base

It does not directly depend on qmake anymore.

Change-Id: I3b9625e54d98c79ef137059cf4554b3f2807e88e
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
This commit is contained in:
hjk
2018-07-02 18:40:29 +02:00
parent 5807cea413
commit 6aeb06c8d3
17 changed files with 74 additions and 172 deletions

View File

@@ -25,6 +25,7 @@
****************************************************************************/
#include "androidbuildapkstep.h"
#include "androidbuildapkwidget.h"
#include "androidconfigurations.h"
#include "androidconstants.h"
@@ -40,6 +41,7 @@
#include <projectexplorer/buildconfiguration.h>
#include <projectexplorer/project.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/target.h>
#include <qtsupport/qtkitinformation.h>
@@ -48,6 +50,8 @@
#include <utils/synchronousprocess.h>
#include <utils/utilsicons.h>
#include <qmakeprojectmanager/qmakeprojectmanagerconstants.h>
#include <QDialogButtonBox>
#include <QHBoxLayout>
#include <QLabel>
@@ -61,12 +65,15 @@
#include <memory>
using namespace ProjectExplorer;
using namespace Android::Internal;
namespace {
Q_LOGGING_CATEGORY(buildapkstepLog, "qtc.android.build.androidbuildapkstep")
}
namespace Android {
using namespace Internal;
const Core::Id ANDROID_BUILD_APK_ID("QmakeProjectManager.AndroidBuildApkStep");
const QVersionNumber gradleScriptRevokedSdkVersion(25, 3, 0);
const char KeystoreLocationKey[] = "KeystoreLocation";
@@ -115,8 +122,8 @@ private:
this);
};
AndroidBuildApkStep::AndroidBuildApkStep(ProjectExplorer::BuildStepList *parent, Core::Id id)
: ProjectExplorer::AbstractProcessStep(parent, id),
AndroidBuildApkStep::AndroidBuildApkStep(BuildStepList *parent)
: AbstractProcessStep(parent, ANDROID_BUILD_APK_ID),
m_buildTargetSdk(AndroidConfig::apiLevelNameFor(AndroidConfigurations::
sdkManager()->latestAndroidSdkPlatform()))
{
@@ -263,7 +270,7 @@ void AndroidBuildApkStep::showInGraphicalShell()
ProjectExplorer::BuildStepConfigWidget *AndroidBuildApkStep::createConfigWidget()
{
return new AndroidBuildApkInnerWidget(this);
return new AndroidBuildApkWidget(this);
}
void AndroidBuildApkStep::processFinished(int exitCode, QProcess::ExitStatus status)
@@ -537,6 +544,22 @@ QString PasswordInputDialog::getPassword(Context context, std::function<bool (co
return isAccepted ? dlg->inputEdit->text() : "";
}
namespace Internal {
// AndroidBuildApkStepFactory
AndroidBuildApkStepFactory::AndroidBuildApkStepFactory()
{
registerStep<AndroidBuildApkStep>(ANDROID_BUILD_APK_ID);
setSupportedProjectType(QmakeProjectManager::Constants::QMAKEPROJECT_ID);
setSupportedDeviceType(Constants::ANDROID_DEVICE_TYPE);
setSupportedStepList(ProjectExplorer::Constants::BUILDSTEPS_BUILD);
setDisplayName(AndroidBuildApkStep::tr("Build Android APK"));
setRepeatable(false);
}
} // namespace Internal
} // namespace Android
#include "androidbuildapkstep.moc"