Commit 02738381 authored by Vikas Pachdha's avatar Vikas Pachdha
Browse files

Android: Remove Ant and make gradle as the default java build tool



All GUI options to choose between  ant and gradle are removed.
Gradle is the only java build tool used now.

Change-Id: I309ff66256c5d40920a5d77a8331c5917c53c185
Reviewed-by: default avatarBogDan Vatra <bogdan@kdab.com>
parent f4a8f52b
...@@ -65,8 +65,6 @@ const char DeployActionKey[] = "Qt4ProjectManager.AndroidDeployQtStep.DeployQtAc ...@@ -65,8 +65,6 @@ const char DeployActionKey[] = "Qt4ProjectManager.AndroidDeployQtStep.DeployQtAc
const char KeystoreLocationKey[] = "KeystoreLocation"; const char KeystoreLocationKey[] = "KeystoreLocation";
const char BuildTargetSdkKey[] = "BuildTargetSdk"; const char BuildTargetSdkKey[] = "BuildTargetSdk";
const char VerboseOutputKey[] = "VerboseOutput"; const char VerboseOutputKey[] = "VerboseOutput";
const char UseGradleKey[] = "UseGradle";
class PasswordInputDialog : public QDialog { class PasswordInputDialog : public QDialog {
public: public:
...@@ -96,9 +94,6 @@ AndroidBuildApkStep::AndroidBuildApkStep(ProjectExplorer::BuildStepList *parent, ...@@ -96,9 +94,6 @@ AndroidBuildApkStep::AndroidBuildApkStep(ProjectExplorer::BuildStepList *parent,
: ProjectExplorer::AbstractProcessStep(parent, id), : ProjectExplorer::AbstractProcessStep(parent, id),
m_buildTargetSdk(AndroidConfig::apiLevelNameFor(AndroidConfigurations::currentConfig().highestAndroidSdk())) m_buildTargetSdk(AndroidConfig::apiLevelNameFor(AndroidConfigurations::currentConfig().highestAndroidSdk()))
{ {
const QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(target()->kit());
if (version && version->qtVersion() >= QtSupport::QtVersionNumber(5, 4, 0))
m_useGradle = AndroidConfigurations::currentConfig().useGrandle();
//: AndroidBuildApkStep default display name //: AndroidBuildApkStep default display name
setDefaultDisplayName(tr("Build Android APK")); setDefaultDisplayName(tr("Build Android APK"));
} }
...@@ -109,14 +104,10 @@ AndroidBuildApkStep::AndroidBuildApkStep(ProjectExplorer::BuildStepList *parent, ...@@ -109,14 +104,10 @@ AndroidBuildApkStep::AndroidBuildApkStep(ProjectExplorer::BuildStepList *parent,
m_deployAction(other->deployAction()), m_deployAction(other->deployAction()),
m_signPackage(other->signPackage()), m_signPackage(other->signPackage()),
m_verbose(other->m_verbose), m_verbose(other->m_verbose),
m_useGradle(other->m_useGradle),
m_openPackageLocation(other->m_openPackageLocation), m_openPackageLocation(other->m_openPackageLocation),
// leave m_openPackageLocationForRun at false // leave m_openPackageLocationForRun at false
m_buildTargetSdk(other->m_buildTargetSdk) m_buildTargetSdk(other->m_buildTargetSdk)
{ {
const QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(target()->kit());
if (m_useGradle && version->qtVersion() < QtSupport::QtVersionNumber(5, 4, 0))
m_useGradle = false;
} }
bool AndroidBuildApkStep::init(QList<const BuildStep *> &earlierSteps) bool AndroidBuildApkStep::init(QList<const BuildStep *> &earlierSteps)
...@@ -138,11 +129,18 @@ bool AndroidBuildApkStep::init(QList<const BuildStep *> &earlierSteps) ...@@ -138,11 +129,18 @@ bool AndroidBuildApkStep::init(QList<const BuildStep *> &earlierSteps)
return false; return false;
const QVersionNumber sdkToolsVersion = AndroidConfigurations::currentConfig().sdkToolsVersion(); const QVersionNumber sdkToolsVersion = AndroidConfigurations::currentConfig().sdkToolsVersion();
if (sdkToolsVersion >= gradleScriptRevokedSdkVersion && if (sdkToolsVersion >= gradleScriptRevokedSdkVersion) {
!version->sourcePath().appendPath("src/3rdparty/gradle").exists()) { if (!version->sourcePath().appendPath("src/3rdparty/gradle").exists()) {
emit addOutput(tr("The installed SDK tools version (%1) does not include Gradle scripts. The " emit addOutput(tr("The installed SDK tools version (%1) does not include Gradle "
"minimum Qt version required for Gradle build to work is %2.") "scripts. The minimum Qt version required for Gradle build to work "
.arg(sdkToolsVersion.toString()).arg("5.9.0/5.6.3"), OutputFormat::Stderr); "is %2").arg(sdkToolsVersion.toString()).arg("5.9.0/5.6.3"),
OutputFormat::Stderr);
return false;
}
} else if (version->qtVersion() < QtSupport::QtVersionNumber(5, 4, 0)) {
emit addOutput(tr("The minimum Qt version required for Gradle build to work is %2. "
"It is recommended to install the latest Qt version.")
.arg("5.4.0"), OutputFormat::Stderr);
return false; return false;
} }
...@@ -241,7 +239,6 @@ bool AndroidBuildApkStep::fromMap(const QVariantMap &map) ...@@ -241,7 +239,6 @@ bool AndroidBuildApkStep::fromMap(const QVariantMap &map)
if (m_buildTargetSdk.isEmpty()) if (m_buildTargetSdk.isEmpty())
m_buildTargetSdk = AndroidConfig::apiLevelNameFor(AndroidConfigurations::currentConfig().highestAndroidSdk()); m_buildTargetSdk = AndroidConfig::apiLevelNameFor(AndroidConfigurations::currentConfig().highestAndroidSdk());
m_verbose = map.value(VerboseOutputKey).toBool(); m_verbose = map.value(VerboseOutputKey).toBool();
m_useGradle = map.value(UseGradleKey).toBool();
return ProjectExplorer::BuildStep::fromMap(map); return ProjectExplorer::BuildStep::fromMap(map);
} }
...@@ -252,7 +249,6 @@ QVariantMap AndroidBuildApkStep::toMap() const ...@@ -252,7 +249,6 @@ QVariantMap AndroidBuildApkStep::toMap() const
map.insert(KeystoreLocationKey, m_keystorePath.toString()); map.insert(KeystoreLocationKey, m_keystorePath.toString());
map.insert(BuildTargetSdkKey, m_buildTargetSdk); map.insert(BuildTargetSdkKey, m_buildTargetSdk);
map.insert(VerboseOutputKey, m_verbose); map.insert(VerboseOutputKey, m_verbose);
map.insert(UseGradleKey, m_useGradle);
return map; return map;
} }
...@@ -269,8 +265,7 @@ QString AndroidBuildApkStep::buildTargetSdk() const ...@@ -269,8 +265,7 @@ QString AndroidBuildApkStep::buildTargetSdk() const
void AndroidBuildApkStep::setBuildTargetSdk(const QString &sdk) void AndroidBuildApkStep::setBuildTargetSdk(const QString &sdk)
{ {
m_buildTargetSdk = sdk; m_buildTargetSdk = sdk;
if (m_useGradle) AndroidManager::updateGradleProperties(target());
AndroidManager::updateGradleProperties(target());
} }
AndroidBuildApkStep::AndroidDeployAction AndroidBuildApkStep::deployAction() const AndroidBuildApkStep::AndroidDeployAction AndroidBuildApkStep::deployAction() const
...@@ -330,21 +325,6 @@ void AndroidBuildApkStep::setVerboseOutput(bool verbose) ...@@ -330,21 +325,6 @@ void AndroidBuildApkStep::setVerboseOutput(bool verbose)
m_verbose = verbose; m_verbose = verbose;
} }
bool AndroidBuildApkStep::useGradle() const
{
return m_useGradle;
}
void AndroidBuildApkStep::setUseGradle(bool b)
{
if (m_useGradle != b) {
m_useGradle = b;
if (m_useGradle)
AndroidManager::updateGradleProperties(target());
emit useGradleChanged();
}
}
bool AndroidBuildApkStep::addDebugger() const bool AndroidBuildApkStep::addDebugger() const
{ {
return m_addDebugger; return m_addDebugger;
......
...@@ -69,9 +69,6 @@ public: ...@@ -69,9 +69,6 @@ public:
bool verboseOutput() const; bool verboseOutput() const;
void setVerboseOutput(bool verbose); void setVerboseOutput(bool verbose);
bool useGradle() const;
void setUseGradle(bool b);
bool addDebugger() const; bool addDebugger() const;
void setAddDebugger(bool debug); void setAddDebugger(bool debug);
...@@ -81,9 +78,6 @@ public: ...@@ -81,9 +78,6 @@ public:
virtual Utils::FileName androidPackageSourceDir() const = 0; virtual Utils::FileName androidPackageSourceDir() const = 0;
void setDeployAction(AndroidDeployAction deploy); void setDeployAction(AndroidDeployAction deploy);
signals:
void useGradleChanged();
protected: protected:
Q_INVOKABLE void showInGraphicalShell(); Q_INVOKABLE void showInGraphicalShell();
...@@ -101,7 +95,6 @@ protected: ...@@ -101,7 +95,6 @@ protected:
AndroidDeployAction m_deployAction = BundleLibrariesDeployment; AndroidDeployAction m_deployAction = BundleLibrariesDeployment;
bool m_signPackage = false; bool m_signPackage = false;
bool m_verbose = false; bool m_verbose = false;
bool m_useGradle = true; // Ant builds are deprecated.
bool m_openPackageLocation = false; bool m_openPackageLocation = false;
bool m_openPackageLocationForRun = false; bool m_openPackageLocationForRun = false;
bool m_addDebugger = true; bool m_addDebugger = true;
......
...@@ -54,8 +54,6 @@ AndroidBuildApkWidget::AndroidBuildApkWidget(AndroidBuildApkStep *step) ...@@ -54,8 +54,6 @@ AndroidBuildApkWidget::AndroidBuildApkWidget(AndroidBuildApkStep *step)
{ {
m_ui->setupUi(this); m_ui->setupUi(this);
m_ui->deprecatedInfoIconLabel->setPixmap(Utils::Icons::INFO.pixmap());
// Target sdk combobox // Target sdk combobox
int minApiLevel = 9; int minApiLevel = 9;
const AndroidConfig &config = AndroidConfigurations::currentConfig(); const AndroidConfig &config = AndroidConfigurations::currentConfig();
...@@ -90,9 +88,6 @@ AndroidBuildApkWidget::AndroidBuildApkWidget(AndroidBuildApkStep *step) ...@@ -90,9 +88,6 @@ AndroidBuildApkWidget::AndroidBuildApkWidget(AndroidBuildApkStep *step)
m_ui->signingDebugWarningLabel->hide(); m_ui->signingDebugWarningLabel->hide();
signPackageCheckBoxToggled(m_step->signPackage()); signPackageCheckBoxToggled(m_step->signPackage());
m_ui->useGradleCheckBox->setEnabled(config.antScriptsAvailable());
m_ui->useGradleCheckBox->setChecked(!config.antScriptsAvailable() ||
m_step->useGradle());
m_ui->verboseOutputCheckBox->setChecked(m_step->verboseOutput()); m_ui->verboseOutputCheckBox->setChecked(m_step->verboseOutput());
m_ui->openPackageLocationCheckBox->setChecked(m_step->openPackageLocation()); m_ui->openPackageLocationCheckBox->setChecked(m_step->openPackageLocation());
m_ui->addDebuggerCheckBox->setChecked(m_step->addDebugger()); m_ui->addDebuggerCheckBox->setChecked(m_step->addDebugger());
...@@ -108,8 +103,6 @@ AndroidBuildApkWidget::AndroidBuildApkWidget(AndroidBuildApkStep *step) ...@@ -108,8 +103,6 @@ AndroidBuildApkWidget::AndroidBuildApkWidget(AndroidBuildApkStep *step)
connect(m_ui->bundleQtOption, &QAbstractButton::clicked, connect(m_ui->bundleQtOption, &QAbstractButton::clicked,
this, &AndroidBuildApkWidget::setBundleQtLibs); this, &AndroidBuildApkWidget::setBundleQtLibs);
connect(m_ui->useGradleCheckBox, &QAbstractButton::toggled,
this, &AndroidBuildApkWidget::useGradleCheckBoxToggled);
connect(m_ui->openPackageLocationCheckBox, &QAbstractButton::toggled, connect(m_ui->openPackageLocationCheckBox, &QAbstractButton::toggled,
this, &AndroidBuildApkWidget::openPackageLocationCheckBoxToggled); this, &AndroidBuildApkWidget::openPackageLocationCheckBoxToggled);
connect(m_ui->verboseOutputCheckBox, &QAbstractButton::toggled, connect(m_ui->verboseOutputCheckBox, &QAbstractButton::toggled,
...@@ -135,9 +128,6 @@ AndroidBuildApkWidget::AndroidBuildApkWidget(AndroidBuildApkStep *step) ...@@ -135,9 +128,6 @@ AndroidBuildApkWidget::AndroidBuildApkWidget(AndroidBuildApkStep *step)
this, &AndroidBuildApkWidget::updateSigningWarning); this, &AndroidBuildApkWidget::updateSigningWarning);
updateSigningWarning(); updateSigningWarning();
QtSupport::BaseQtVersion *qt = QtSupport::QtKitInformation::qtVersion(step->target()->kit());
bool qt54 = qt->qtVersion() >= QtSupport::QtVersionNumber(5, 4, 0);
m_ui->useGradleCheckBox->setVisible(qt54);
} }
AndroidBuildApkWidget::~AndroidBuildApkWidget() AndroidBuildApkWidget::~AndroidBuildApkWidget()
...@@ -247,8 +237,3 @@ void AndroidBuildApkWidget::updateSigningWarning() ...@@ -247,8 +237,3 @@ void AndroidBuildApkWidget::updateSigningWarning()
m_ui->signingDebugWarningLabel->setVisible(false); m_ui->signingDebugWarningLabel->setVisible(false);
} }
} }
void AndroidBuildApkWidget::useGradleCheckBoxToggled(bool checked)
{
m_step->setUseGradle(checked);
}
...@@ -57,7 +57,6 @@ private: ...@@ -57,7 +57,6 @@ private:
void certificatesAliasComboBoxCurrentIndexChanged(const QString &alias); void certificatesAliasComboBoxCurrentIndexChanged(const QString &alias);
void certificatesAliasComboBoxActivated(const QString &alias); void certificatesAliasComboBoxActivated(const QString &alias);
void updateSigningWarning(); void updateSigningWarning();
void useGradleCheckBoxToggled(bool checked);
void openPackageLocationCheckBoxToggled(bool checked); void openPackageLocationCheckBoxToggled(bool checked);
void verboseOutputCheckBoxToggled(bool checked); void verboseOutputCheckBoxToggled(bool checked);
void updateKeyStorePath(const QString &path); void updateKeyStorePath(const QString &path);
......
...@@ -6,8 +6,8 @@ ...@@ -6,8 +6,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>819</width> <width>641</width>
<height>478</height> <height>331</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
...@@ -145,66 +145,21 @@ ...@@ -145,66 +145,21 @@
<string>Advanced Actions</string> <string>Advanced Actions</string>
</property> </property>
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="gridLayout">
<item row="0" column="0"> <item row="0" column="0" colspan="2">
<widget class="QCheckBox" name="useGradleCheckBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Use Gradle (Ant builds are deprecated)</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="deprecatedInfoIconLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>Gradle builds are forced from Android SDK tools version 25.3.0 onwards as Ant scripts are no longer available.</string>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="0" column="2">
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Preferred</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="0" colspan="3">
<widget class="QCheckBox" name="openPackageLocationCheckBox"> <widget class="QCheckBox" name="openPackageLocationCheckBox">
<property name="text"> <property name="text">
<string>Open package location after build</string> <string>Open package location after build</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="2" column="0" colspan="3"> <item row="1" column="0" colspan="2">
<widget class="QCheckBox" name="verboseOutputCheckBox"> <widget class="QCheckBox" name="verboseOutputCheckBox">
<property name="text"> <property name="text">
<string>Verbose output</string> <string>Verbose output</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="3" column="0" colspan="3"> <item row="2" column="0" colspan="2">
<widget class="QCheckBox" name="addDebuggerCheckBox"> <widget class="QCheckBox" name="addDebuggerCheckBox">
<property name="enabled"> <property name="enabled">
<bool>false</bool> <bool>false</bool>
......
...@@ -84,16 +84,13 @@ using namespace Internal; ...@@ -84,16 +84,13 @@ using namespace Internal;
namespace { namespace {
const char jdkSettingsPath[] = "HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit"; const char jdkSettingsPath[] = "HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit";
const QVersionNumber sdkToolsAntMissingVersion(25, 3, 0);
const QLatin1String SettingsGroup("AndroidConfigurations"); const QLatin1String SettingsGroup("AndroidConfigurations");
const QLatin1String SDKLocationKey("SDKLocation"); const QLatin1String SDKLocationKey("SDKLocation");
const QLatin1String NDKLocationKey("NDKLocation"); const QLatin1String NDKLocationKey("NDKLocation");
const QLatin1String AntLocationKey("AntLocation");
const QLatin1String OpenJDKLocationKey("OpenJDKLocation"); const QLatin1String OpenJDKLocationKey("OpenJDKLocation");
const QLatin1String KeystoreLocationKey("KeystoreLocation"); const QLatin1String KeystoreLocationKey("KeystoreLocation");
const QLatin1String AutomaticKitCreationKey("AutomatiKitCreation"); const QLatin1String AutomaticKitCreationKey("AutomatiKitCreation");
const QLatin1String UseGradleKey("UseGradle");
const QLatin1String MakeExtraSearchDirectory("MakeExtraSearchDirectory"); const QLatin1String MakeExtraSearchDirectory("MakeExtraSearchDirectory");
const QLatin1String PartitionSizeKey("PartitionSize"); const QLatin1String PartitionSizeKey("PartitionSize");
const QLatin1String ToolchainHostKey("ToolchainHost"); const QLatin1String ToolchainHostKey("ToolchainHost");
...@@ -250,8 +247,6 @@ void AndroidConfig::load(const QSettings &settings) ...@@ -250,8 +247,6 @@ void AndroidConfig::load(const QSettings &settings)
m_partitionSize = settings.value(PartitionSizeKey, 1024).toInt(); m_partitionSize = settings.value(PartitionSizeKey, 1024).toInt();
m_sdkLocation = FileName::fromString(settings.value(SDKLocationKey).toString()); m_sdkLocation = FileName::fromString(settings.value(SDKLocationKey).toString());
m_ndkLocation = FileName::fromString(settings.value(NDKLocationKey).toString()); m_ndkLocation = FileName::fromString(settings.value(NDKLocationKey).toString());
m_antLocation = FileName::fromString(settings.value(AntLocationKey).toString());
m_useGradle = settings.value(UseGradleKey, false).toBool();
m_openJDKLocation = FileName::fromString(settings.value(OpenJDKLocationKey).toString()); m_openJDKLocation = FileName::fromString(settings.value(OpenJDKLocationKey).toString());
m_keystoreLocation = FileName::fromString(settings.value(KeystoreLocationKey).toString()); m_keystoreLocation = FileName::fromString(settings.value(KeystoreLocationKey).toString());
m_toolchainHost = settings.value(ToolchainHostKey).toString(); m_toolchainHost = settings.value(ToolchainHostKey).toString();
...@@ -267,7 +262,6 @@ void AndroidConfig::load(const QSettings &settings) ...@@ -267,7 +262,6 @@ void AndroidConfig::load(const QSettings &settings)
// persisten settings // persisten settings
m_sdkLocation = FileName::fromString(reader.restoreValue(SDKLocationKey, m_sdkLocation.toString()).toString()); m_sdkLocation = FileName::fromString(reader.restoreValue(SDKLocationKey, m_sdkLocation.toString()).toString());
m_ndkLocation = FileName::fromString(reader.restoreValue(NDKLocationKey, m_ndkLocation.toString()).toString()); m_ndkLocation = FileName::fromString(reader.restoreValue(NDKLocationKey, m_ndkLocation.toString()).toString());
m_antLocation = FileName::fromString(reader.restoreValue(AntLocationKey, m_antLocation.toString()).toString());
m_openJDKLocation = FileName::fromString(reader.restoreValue(OpenJDKLocationKey, m_openJDKLocation.toString()).toString()); m_openJDKLocation = FileName::fromString(reader.restoreValue(OpenJDKLocationKey, m_openJDKLocation.toString()).toString());
m_keystoreLocation = FileName::fromString(reader.restoreValue(KeystoreLocationKey, m_keystoreLocation.toString()).toString()); m_keystoreLocation = FileName::fromString(reader.restoreValue(KeystoreLocationKey, m_keystoreLocation.toString()).toString());
m_toolchainHost = reader.restoreValue(ToolchainHostKey, m_toolchainHost).toString(); m_toolchainHost = reader.restoreValue(ToolchainHostKey, m_toolchainHost).toString();
...@@ -291,8 +285,6 @@ void AndroidConfig::save(QSettings &settings) const ...@@ -291,8 +285,6 @@ void AndroidConfig::save(QSettings &settings) const
// user settings // user settings
settings.setValue(SDKLocationKey, m_sdkLocation.toString()); settings.setValue(SDKLocationKey, m_sdkLocation.toString());
settings.setValue(NDKLocationKey, m_ndkLocation.toString()); settings.setValue(NDKLocationKey, m_ndkLocation.toString());
settings.setValue(AntLocationKey, m_antLocation.toString());
settings.setValue(UseGradleKey, m_useGradle);
settings.setValue(OpenJDKLocationKey, m_openJDKLocation.toString()); settings.setValue(OpenJDKLocationKey, m_openJDKLocation.toString());
settings.setValue(KeystoreLocationKey, m_keystoreLocation.toString()); settings.setValue(KeystoreLocationKey, m_keystoreLocation.toString());
settings.setValue(PartitionSizeKey, m_partitionSize); settings.setValue(PartitionSizeKey, m_partitionSize);
...@@ -400,14 +392,6 @@ FileName AndroidConfig::androidToolPath() const ...@@ -400,14 +392,6 @@ FileName AndroidConfig::androidToolPath() const
} }
} }
FileName AndroidConfig::antToolPath() const
{
if (!m_antLocation.isEmpty())
return m_antLocation;
else
return FileName::fromLatin1("ant");
}
FileName AndroidConfig::emulatorToolPath() const FileName AndroidConfig::emulatorToolPath() const
{ {
FileName path = m_sdkLocation; FileName path = m_sdkLocation;
...@@ -844,16 +828,6 @@ void AndroidConfig::setNdkLocation(const FileName &ndkLocation) ...@@ -844,16 +828,6 @@ void AndroidConfig::setNdkLocation(const FileName &ndkLocation)
m_NdkInformationUpToDate = false; m_NdkInformationUpToDate = false;
} }
FileName AndroidConfig::antLocation() const
{
return m_antLocation;
}
void AndroidConfig::setAntLocation(const FileName &antLocation)
{
m_antLocation = antLocation;
}
FileName AndroidConfig::openJDKLocation() const FileName AndroidConfig::openJDKLocation() const
{ {
return m_openJDKLocation; return m_openJDKLocation;
...@@ -906,25 +880,6 @@ void AndroidConfig::setAutomaticKitCreation(bool b) ...@@ -906,25 +880,6 @@ void AndroidConfig::setAutomaticKitCreation(bool b)
m_automaticKitCreation = b; m_automaticKitCreation = b;
} }
bool AndroidConfig::antScriptsAvailable() const
{
return sdkToolsVersion() < sdkToolsAntMissingVersion;
}
bool AndroidConfig::useGrandle() const
{
if (antScriptsAvailable()) {
return m_useGradle;
}
// Force gradle builds.
return true;
}
void AndroidConfig::setUseGradle(bool b)
{
m_useGradle = b;
}
/////////////////////////////////// ///////////////////////////////////
// AndroidConfigurations // AndroidConfigurations
/////////////////////////////////// ///////////////////////////////////
...@@ -1225,16 +1180,6 @@ void AndroidConfigurations::load() ...@@ -1225,16 +1180,6 @@ void AndroidConfigurations::load()
settings->beginGroup(SettingsGroup); settings->beginGroup(SettingsGroup);
m_config.load(*settings); m_config.load(*settings);
if (m_config.antLocation().isEmpty()) {
Environment env = Environment::systemEnvironment();
FileName location = env.searchInPath(QLatin1String("ant"));
QFileInfo fi = location.toFileInfo();
if (fi.exists() && fi.isExecutable() && !fi.isDir()) {
m_config.setAntLocation(location);
saveSettings = true;
}
}
if (m_config.openJDKLocation().isEmpty()) { if (m_config.openJDKLocation().isEmpty()) {
if (HostOsInfo::isLinuxHost()) { if (HostOsInfo::isLinuxHost()) {
Environment env = Environment::systemEnvironment(); Environment env = Environment::systemEnvironment();
......
...@@ -119,9 +119,6 @@ public: ...@@ -119,9 +119,6 @@ public:
QVersionNumber ndkVersion() const; QVersionNumber ndkVersion() const;
void setNdkLocation(const Utils::FileName &ndkLocation); void setNdkLocation(const Utils::FileName &ndkLocation);
Utils::FileName antLocation() const;
void setAntLocation(const Utils::FileName &antLocation);
Utils::FileName openJDKLocation() const; Utils::FileName openJDKLocation() const;
void setOpenJDKLocation(const Utils::FileName &openJDKLocation); void setOpenJDKLocation(const Utils::FileName &openJDKLocation);
...@@ -137,14 +134,8 @@ public: ...@@ -137,14 +134,8 @@ public:
bool automaticKitCreation() const; bool automaticKitCreation() const;
void setAutomaticKitCreation(bool b); void setAutomaticKitCreation(bool b);
bool antScriptsAvailable() const;
bool useGrandle() const;
void setUseGradle(bool b);
Utils::FileName adbToolPath() const; Utils::FileName adbToolPath() const;
Utils::FileName androidToolPath() const; Utils::FileName androidToolPath() const;
Utils::FileName antToolPath() const;
Utils::FileName emulatorToolPath() const; Utils::FileName emulatorToolPath() const;
Utils::FileName sdkManagerToolPath() const; Utils::FileName sdkManagerToolPath() const;
Utils::FileName avdManagerToolPath() const; Utils::FileName avdManagerToolPath() const;
...@@ -203,13 +194,11 @@ private: ...@@ -203,13 +194,11 @@ private:
Utils::FileName m_sdkLocation; Utils::FileName m_sdkLocation;
Utils::FileName m_ndkLocation; Utils::FileName m_ndkLocation;
Utils::FileName m_antLocation;
Utils::FileName m_openJDKLocation; Utils::FileName m_openJDKLocation;
Utils::FileName m_keystoreLocation; Utils::FileName m_keystoreLocation;
QStringList m_makeExtraSearchDirectories; QStringList m_makeExtraSearchDirectories;
unsigned m_partitionSize = 1024; unsigned m_partitionSize = 1024;
bool m_automaticKitCreation = true; bool m_automaticKitCreation = true;
bool m_useGradle = true; // Ant builds are deprecated.
//caches //caches
mutable bool m_availableSdkPlatformsUpToDate = false; mutable bool m_availableSdkPlatformsUpToDate = false;
......
...@@ -233,8 +233,8 @@ bool AndroidDeployQtStep::init(QList<const BuildStep *> &earlierSteps) ...@@ -233,8 +233,8 @@ bool AndroidDeployQtStep::init(QList<const BuildStep *> &earlierSteps)
Utils::QtcProcess::addArg(&m_androiddeployqtArgs, QLatin1String("bundled")); Utils::QtcProcess::addArg(&m_androiddeployqtArgs, QLatin1String("bundled"));