2022-08-19 15:59:36 +02:00
|
|
|
// Copyright (C) 2016 BogDan Vatra <bog_dan_ro@yahoo.com>
|
2022-12-21 10:12:09 +01:00
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
2012-04-18 20:30:57 +03:00
|
|
|
|
2016-03-18 07:55:01 +01:00
|
|
|
#pragma once
|
2012-07-27 15:43:00 +02:00
|
|
|
|
2012-04-18 20:30:57 +03:00
|
|
|
#include <qtsupport/baseqtversion.h>
|
2019-02-14 12:29:00 +01:00
|
|
|
#include <qtsupport/qtversionfactory.h>
|
2012-04-18 20:30:57 +03:00
|
|
|
|
2012-07-27 15:43:00 +02:00
|
|
|
#include <QCoreApplication>
|
|
|
|
|
|
2012-04-18 20:30:57 +03:00
|
|
|
namespace Android {
|
|
|
|
|
namespace Internal {
|
|
|
|
|
|
2022-01-21 16:06:36 +01:00
|
|
|
class AndroidQtVersion : public QtSupport::QtVersion
|
2012-04-18 20:30:57 +03:00
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
AndroidQtVersion();
|
|
|
|
|
|
2018-07-25 12:19:15 +02:00
|
|
|
bool isValid() const override;
|
|
|
|
|
QString invalidReason() const override;
|
2012-04-18 20:30:57 +03:00
|
|
|
|
2020-08-20 13:58:21 +02:00
|
|
|
bool supportsMultipleQtAbis() const override;
|
2019-05-27 11:04:18 +02:00
|
|
|
ProjectExplorer::Abis detectQtAbis() const override;
|
2012-04-18 20:30:57 +03:00
|
|
|
|
2018-07-25 12:19:15 +02:00
|
|
|
void addToEnvironment(const ProjectExplorer::Kit *k, Utils::Environment &env) const override;
|
2021-05-25 15:54:12 +02:00
|
|
|
void setupQmakeRunEnvironment(Utils::Environment &env) const override;
|
2012-12-07 19:52:56 +02:00
|
|
|
|
2020-06-26 13:59:38 +02:00
|
|
|
QSet<Utils::Id> availableFeatures() const override;
|
|
|
|
|
QSet<Utils::Id> targetDeviceTypes() const override;
|
2012-04-18 20:30:57 +03:00
|
|
|
|
2018-07-25 12:19:15 +02:00
|
|
|
QString description() const override;
|
2019-08-26 14:19:07 +03:00
|
|
|
const QStringList &androidAbis() const;
|
2019-02-18 11:18:05 +01:00
|
|
|
int minimumNDK() const;
|
|
|
|
|
|
2021-02-12 20:57:18 +01:00
|
|
|
static Utils::FilePath androidDeploymentSettings(const ProjectExplorer::Target *target);
|
|
|
|
|
|
2023-01-09 13:59:45 +01:00
|
|
|
struct BuiltWith {
|
|
|
|
|
int apiVersion = -1;
|
|
|
|
|
QVersionNumber ndkVersion;
|
|
|
|
|
};
|
|
|
|
|
static BuiltWith parseBuiltWith(const QByteArray &modulesCoreJsonData, bool *ok = nullptr);
|
|
|
|
|
BuiltWith builtWith(bool *ok = nullptr) const;
|
|
|
|
|
|
2013-08-01 12:49:47 +02:00
|
|
|
protected:
|
2018-07-25 12:19:15 +02:00
|
|
|
void parseMkSpec(ProFileEvaluator *) const override;
|
2013-08-01 12:49:47 +02:00
|
|
|
private:
|
2019-11-18 16:57:44 +01:00
|
|
|
std::unique_ptr<QObject> m_guard;
|
2019-08-26 14:19:07 +03:00
|
|
|
mutable QStringList m_androidAbis;
|
2018-11-23 10:08:35 +01:00
|
|
|
mutable int m_minNdk = -1;
|
2012-04-18 20:30:57 +03:00
|
|
|
};
|
|
|
|
|
|
2019-02-14 12:29:00 +01:00
|
|
|
class AndroidQtVersionFactory : public QtSupport::QtVersionFactory
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
AndroidQtVersionFactory();
|
|
|
|
|
};
|
|
|
|
|
|
2012-04-18 20:30:57 +03:00
|
|
|
} // namespace Internal
|
|
|
|
|
} // namespace Android
|