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: Daniel Teske <daniel.teske@digia.com>
This commit is contained in:
Christian Strømme
2013-05-16 03:58:26 +02:00
committed by Christian Stromme
parent 1c6a3b9dbf
commit 35b96f2fc1

View File

@@ -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"))) {