diff options
Diffstat (limited to 'share/qbs/module-providers/Qt/templates/android_support.qbs')
-rw-r--r-- | share/qbs/module-providers/Qt/templates/android_support.qbs | 72 |
1 files changed, 35 insertions, 37 deletions
diff --git a/share/qbs/module-providers/Qt/templates/android_support.qbs b/share/qbs/module-providers/Qt/templates/android_support.qbs index 68a29bb95..a1975b890 100644 --- a/share/qbs/module-providers/Qt/templates/android_support.qbs +++ b/share/qbs/module-providers/Qt/templates/android_support.qbs @@ -8,20 +8,18 @@ import qbs.Xml Module { version: @version@ - property bool useMinistro: false property string qmlRootDir: product.sourceDirectory property stringList extraPrefixDirs property stringList deploymentDependencies // qmake: ANDROID_DEPLOYMENT_DEPENDENCIES property stringList extraPlugins // qmake: ANDROID_EXTRA_PLUGINS property stringList extraLibs // qmake: ANDROID_EXTRA_LIBS property bool verboseAndroidDeployQt: false - property string _androidDeployQtFilePath: FileInfo.joinPaths(_qtBinaryDir, "bin", "androiddeployqt") property string _qtBinaryDir property string _qtInstallDir - // TODO: Remove in 1.20 - // From 1.20 product property used from an export item will point to the + // TODO: Remove in 1.21 + // From 1.21 product property used from an export item will point to the // importingProduct property. So using the importingProduct property will be useless // and the change will be reverted property var _importingProduct: (typeof importingProduct !== "undefined") ? importingProduct : @@ -58,6 +56,8 @@ Module { Android.sdk.customManifestProcessing: true java._tagJniHeaders: false // prevent rule cycle } + readonly property string _qtAndroidJarFileName: Utilities.versionCompare(version, "6.0") >= 0 ? + "Qt6Android.jar" : "QtAndroid.jar" Properties { condition: _enableSdkSupport && Utilities.versionCompare(version, "5.15") >= 0 && Utilities.versionCompare(version, "6.0") < 0 @@ -280,39 +280,36 @@ Module { "android.manifest_final", "android.resources", "android.assets", "bundled_jar", "android.deployqt_list", ] - outputArtifacts: { - var artifacts = [ - { - filePath: "AndroidManifest.xml", - fileTags: "android.manifest_final" - }, - { - filePath: product.Qt.android_support._deployQtOutDir + "/res/values/libs.xml", - fileTags: "android.resources" - }, - { - filePath: product.Qt.android_support._deployQtOutDir - + "/res/values/strings.xml", - fileTags: "android.resources" - }, - { - filePath: product.Qt.android_support._deployQtOutDir + "/assets/.dummy", - fileTags: "android.assets" - }, - { - filePath: "deployqt.list", - fileTags: "android.deployqt_list" - }, - - ]; - if (!product.Qt.android_support.useMinistro) { - artifacts.push({ - filePath: FileInfo.joinPaths(product.java.classFilesDir, "QtAndroid.jar"), - fileTags: ["bundled_jar"] - }); + outputArtifacts: [ + { + filePath: "AndroidManifest.xml", + fileTags: "android.manifest_final" + }, + { + filePath: product.Qt.android_support._deployQtOutDir + "/res/values/libs.xml", + fileTags: "android.resources" + }, + { + filePath: product.Qt.android_support._deployQtOutDir + + "/res/values/strings.xml", + fileTags: "android.resources" + }, + { + filePath: product.Qt.android_support._deployQtOutDir + "/assets/.dummy", + fileTags: "android.assets" + }, + { + filePath: "deployqt.list", + fileTags: "android.deployqt_list" + }, + // androiddeployqt potentially copies more jar files but this one will always be there + // since it comes with Qt.core + { + filePath: FileInfo.joinPaths(product.java.classFilesDir, + product.Qt.android_support._qtAndroidJarFileName), + fileTags: "bundled_jar" } - return artifacts; - } + ] prepare: { var copyCmd = new JavaScriptCommand(); copyCmd.description = "copying Qt resource templates"; @@ -343,7 +340,7 @@ Module { var androidDeployQtArgs = [ "--output", product.Qt.android_support._deployQtOutDir, "--input", inputs["qt_androiddeployqt_input"][0].filePath, "--aux-mode", - "--deployment", product.Qt.android_support.useMinistro ? "ministro" : "bundled", + "--deployment", "bundled", "--android-platform", product.Android.sdk.platform, ]; if (product.Qt.android_support.verboseAndroidDeployQt) @@ -360,6 +357,7 @@ Module { var moveCmd = new JavaScriptCommand(); moveCmd.description = "processing androiddeployqt outout"; moveCmd.sourceCode = function() { + File.makePath(product.java.classFilesDir); var libsDir = product.Qt.android_support._deployQtOutDir + "/libs"; var libDir = product.Android.sdk.packageContentsDir + "/lib"; var listFilePath = outputs["android.deployqt_list"][0].filePath; |