From 08e3d36098937844e84d447527ac50b9e19e74ff Mon Sep 17 00:00:00 2001 From: Max Bespalov Date: Sun, 19 Jun 2022 14:43:55 +0200 Subject: 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 --- share/qbs/modules/Android/sdk/utils.js | 7 +++++++ 1 file changed, 7 insertions(+) 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; -- cgit v1.2.3