aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Bespalov <bespalov.maxim.a@gmail.com>2022-06-19 14:43:55 +0200
committerMax Bespalov <bespalov.maxim.a@gmail.com>2022-06-23 16:48:37 +0000
commit08e3d36098937844e84d447527ac50b9e19e74ff (patch)
tree64ca467e6c8c005e9551eb7c45af9bfb2a034828
parent2a0ddd654903a2dac1b73a7929e49646e4bb676a (diff)
Fix compilation of .jar files declared in the product
The java.jar artifacts declared in the product were ignored during dex compilation. The function were looking only for jars in the dependencies. Fixes: QBS-1701 Change-Id: I4d7b355236fc988f44161aaa22d87a16a7e94fb6 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
-rw-r--r--share/qbs/modules/Android/sdk/utils.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/share/qbs/modules/Android/sdk/utils.js b/share/qbs/modules/Android/sdk/utils.js
index d217d113b..2b111522e 100644
--- a/share/qbs/modules/Android/sdk/utils.js
+++ b/share/qbs/modules/Android/sdk/utils.js
@@ -91,6 +91,13 @@ function prepareDex(project, product, inputs, outputs, input, output, explicitly
}
product.dependencies.forEach(traverseJarDeps);
+ if (typeof product.artifacts["java.jar"] !== "undefined") {
+ product.artifacts["java.jar"].forEach(function(artifact) {
+ if (!jarFiles.contains(artifact.filePath))
+ jarFiles.push(artifact.filePath);
+ });
+ }
+
args = args.concat(jarFiles);
var cmd;