Commit 35b96f2f authored by Christian Strømme's avatar Christian Strømme Committed by Christian Stromme

Android: Detect conditional dependencies.

To solve the problem with libQt5MultimediaQuick_p we need a way to detect
if an application is using both QtMultimedia and QtQuick.
This change adds logic to parse the -dependencies.xml file and look for
lib elements that have the extra attribute "extends". Libs with the
extends attribute will only be added to the list of dependencies, if the
library it extends is available.

Task-number: QTCREATORBUG-9300
Change-Id: I6f3e0a6d9158a91824e1e113f6aab7ec1112dd56
Reviewed-by: default avatarDaniel Teske <daniel.teske@digia.com>
parent 1c6a3b9d
......@@ -895,8 +895,14 @@ QString AndroidManager::loadLocal(ProjectExplorer::Target *target, int apiLevel,
if (libElement.attribute(QLatin1String("bundling")).toInt() == (item == BundledJar ? 1 : 0)) {
if (libElement.hasAttribute(attribute)) {
QString dependencyLib = libElement.attribute(attribute).arg(apiLevel);
if (!dependencyLibs.contains(dependencyLib))
if (libElement.hasAttribute(QLatin1String("extends"))) {
const QString extends = libElement.attribute(QLatin1String("extends"));
if (libs.contains(extends)) {
dependencyLibs << dependencyLib;
}
} else if (!dependencyLibs.contains(dependencyLib)) {
dependencyLibs << dependencyLib;
}
}
if (libElement.hasAttribute(QLatin1String("replaces"))) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment