forked from qt-creator/qt-creator
Android: Force Gradle build post SDK tools version 25.3.0
Task-number: QTCREATORBUG-18013 Change-Id: Ic912427783d079f5f6bf06e3bf9a44657d24a96f Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: BogDan Vatra <bogdan@kdab.com>
This commit is contained in:
@@ -60,6 +60,8 @@
|
||||
namespace Android {
|
||||
using namespace Internal;
|
||||
|
||||
const QVersionNumber gradleScriptRevokedSdkVersion(25, 3, 0);
|
||||
const QVersionNumber gradleScriptsContainedQtVersion(5, 9, 0);
|
||||
const QLatin1String DeployActionKey("Qt4ProjectManager.AndroidDeployQtStep.DeployQtAction");
|
||||
const QLatin1String KeystoreLocationKey("KeystoreLocation");
|
||||
const QLatin1String BuildTargetSdkKey("BuildTargetSdk");
|
||||
@@ -140,6 +142,15 @@ bool AndroidBuildApkStep::init(QList<const BuildStep *> &earlierSteps)
|
||||
if (!version)
|
||||
return false;
|
||||
|
||||
if (AndroidConfigurations::currentConfig().sdkToolsVersion() >= gradleScriptRevokedSdkVersion &&
|
||||
QVersionNumber::fromString(version->qtVersionString()) < gradleScriptsContainedQtVersion) {
|
||||
emit addOutput(tr("The installed SDK tools version (%1) does not include Gradle scripts. The "
|
||||
"minimum Qt version required for Gradle build to work is %2")
|
||||
.arg(gradleScriptRevokedSdkVersion.toString())
|
||||
.arg(gradleScriptsContainedQtVersion.toString()), OutputFormat::Stderr);
|
||||
return false;
|
||||
}
|
||||
|
||||
int minSDKForKit = AndroidManager::minimumSDK(target()->kit());
|
||||
if (AndroidManager::minimumSDK(target()) < minSDKForKit) {
|
||||
emit addOutput(tr("The API level set for the APK is less than the minimum required by the kit."
|
||||
|
||||
Reference in New Issue
Block a user