diff options
author | Christian Kandeler <christian.kandeler@qt.io> | 2018-08-16 15:02:05 +0200 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@qt.io> | 2018-08-27 12:29:06 +0000 |
commit | 7ddbc5997e123c60c45865bae2df380174caf72c (patch) | |
tree | ee9ddd6532e0501c5dce5471cb8e0d706ae8085e /share/qbs | |
parent | dd61fdb5017dcd9521ec389b0b40dad9a93bfd21 (diff) |
Android: Properly support the aidl tool
We now pull in the AIDL framework file and let the user set search paths
for imports.
Change-Id: I93460a77b064fa87849b93c0b0e4bd3bbfd7459f
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Diffstat (limited to 'share/qbs')
-rw-r--r-- | share/qbs/modules/Android/sdk/sdk.qbs | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/share/qbs/modules/Android/sdk/sdk.qbs b/share/qbs/modules/Android/sdk/sdk.qbs index cb26b2ee0..d5bd29477 100644 --- a/share/qbs/modules/Android/sdk/sdk.qbs +++ b/share/qbs/modules/Android/sdk/sdk.qbs @@ -135,6 +135,8 @@ Module { property path zipalignFilePath: FileInfo.joinPaths(buildToolsDir, "zipalign") property path androidJarFilePath: FileInfo.joinPaths(sdkDir, "platforms", platform, "android.jar") + property path frameworkAidlFilePath: FileInfo.joinPaths(sdkDir, "platforms", platform, + "framework.aidl") property path generatedJavaFilesBaseDir: FileInfo.joinPaths(product.buildDirectory, "gen") property path generatedJavaFilesDir: FileInfo.joinPaths(generatedJavaFilesBaseDir, (packageName || "").split('.').join('/')) @@ -145,6 +147,7 @@ Module { ".android", "debug.keystore") property bool useApksigner: buildToolsVersion && Utilities.versionCompare( buildToolsVersion, "24.0.3") >= 0 + property stringList aidlSearchPaths Depends { name: "java" } java.languageVersion: platformJavaVersion @@ -216,8 +219,13 @@ Module { } prepare: { - var aidl = ModUtils.moduleProperty(product, "aidlFilePath"); - cmd = new Command(aidl, [input.filePath, output.filePath]); + var aidl = product.Android.sdk.aidlFilePath; + var args = ["-p" + product.Android.sdk.frameworkAidlFilePath]; + var aidlSearchPaths = input.Android.sdk.aidlSearchPaths; + for (var i = 0; i < (aidlSearchPaths ? aidlSearchPaths.length : 0); ++i) + args.push("-I" + aidlSearchPaths[i]); + args.push(input.filePath, output.filePath); + cmd = new Command(aidl, args); cmd.description = "Processing " + input.fileName; return [cmd]; } |