aboutsummaryrefslogtreecommitdiffstats
path: root/share/qbs/modules/Android
Commit message (Collapse)AuthorAgeFilesLines
* Fix compilation of .jar files declared in the productMax Bespalov2022-06-231-0/+7
| | | | | | | | | 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>
* Fix descriptions for JS commandsDenis Shienkov2021-11-151-3/+3
| | | | | | | | | | | * All descriptions start with a small letter. * Trailing dots have been removed from all descriptions. * For all static library rules replaced 'linking' with 'creating' in descriptions. * Added 'ing' ending to all descriptions where it was missing. Change-Id: I2a4cb9dd53980d33628e097efaae53a68573af42 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Merge branch '1.20' into masterIvan Komissarov2021-10-042-3/+18
|\ | | | | | | Change-Id: Ibb0fdf6dc13d05c5ee45035713a631fdbfa341ad
| * Android: fix aab generationRaphael Cotty2021-09-242-3/+18
| | | | | | | | | | | | | | | | | | | | | | BundleTool doesn't compress native libs by default which are then uncompress when deployed on the device. This patch generates a BuildConfig.json which overwrites default bundletool behavior. Fixes: QTBUG-80766 Change-Id: Id758fe8fdbc1029b76b745f07be8ede3cbc3e96a Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* | Merge branch '1.20' into masterIvan Komissarov2021-09-211-1/+2
|\| | | | | | | Change-Id: Iac2a17ef4bacf25becc7f2082a8a73a21b2f4d76
| * Android: Correct aab generation command descriptionRaphael Cotty2021-09-191-1/+2
| | | | | | | | | | Change-Id: I2c67d35de4268215a38516b6ed8085c60df416ef Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* | Android: Add buildId option to the ndk for the linkerRaphael Cotty2021-09-032-2/+17
|/ | | | | | | | Allow to overwrite default value (sha1) for the --build-id linker flag. Task-number: QBS-1668 Change-Id: Ib26904019eb68c94d345d0e33648b04ccf830de1 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Android: Add option to use dex compiler d8 instead of dxRaphael Cotty2021-05-262-5/+59
| | | | | | | | d8 dex compiler was introduced in Build Tools 28.0.2 to replace dx. It is the default compiler used by gradle since version 4.4 Change-Id: I603c61f6f1a151f3c5be78385bf9648929e7d81b Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* Merge branch '1.19' into masterIvan Komissarov2021-04-241-1/+2
|\ | | | | | | Change-Id: Ic6087168a1d93c2a2b46de825f5c3b9655634e8e
| * Android: Fix aapt compiling command on WindowsMax Bespalov2021-04-071-1/+2
| | | | | | | | | | | | | | | | | | | | When building appt2 package on windows aapt expects to see paths with windows separators. If path isn't converted you get "bad resource path" error. https://android.googlesource.com/platform/frameworks/base/+/9ba47d8/tools/aapt2/compile/Compile.cpp#59 Change-Id: Iabacb020920310533b034138e47d1839b845573a Reviewed-by: Raphaël Cotty <raphael.cotty@gmail.com> Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* | Android: Change default Android Asset Packaging Tool from aapt to aapt2Raphael Cotty2021-04-061-1/+1
|/ | | | | | | | | | aapt2 was introduced in Build Tools since 26.0.2 and replaced aapt in gradle since version 3.0.0. Since Android.sdk now requires Build Tool version 24.0.3 it is possible to default to aapt2. Change-Id: Ia6ec88267ca58413592d6eadde73422311f34d74 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* Android: Code signing moduleRaphaël Cotty2021-04-012-103/+22
| | | | | | | | | | | | | | Android.sdk was already signing the apk package but it was using hardcoded debug key and could only be used to run the application locally. The signing part of the android apk/aab package generation is now in the new codesign module. By default the same debug key is used. But it is now also possible to configure a different key. Task-number: QBS-899 Change-Id: I49c54a4d55578c48363805e927392b3a468805f0 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Android: Add support for ndk 22.1.7171670Raphael Cotty2021-03-311-2/+2
| | | | | | | | | | | | Android ndk 19 introduced a new layout for the platforms and sysroot directory. They are merged into the toolchain directory. Android ndk 22 removed the deprecated platforms and sysroot. Since the minimum required version of Android.ndk is 19 this patch switches Qbs to the new layout. Fixes: QBS-1637 Change-Id: Ie69d305ba77ac1689205e2fb2fd3414a3bada2bd Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* Avoid writing to the global objectRichard Weickelt2021-02-131-2/+2
| | | | | | | | Some variables were accidently created in the global object. This will become an error in the QJS port. Change-Id: Ifa4d929bb7a97af3e49de5c3d7d87924f9c3ad81 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* Add missing import statementsRichard Weickelt2021-02-131-0/+2
| | | | | | | | | The current QtScript implementation does not warn about missing import statements in some cases. Imported .js files should never inherit imports. This will become an error in the JS port. Change-Id: I880afabba64c0766063304c723242e242ac89b81 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* Android: Fix debugging supportRaphaël Cotty2020-12-081-1/+0
| | | | | | | | | | | | | | | | | Add archSuffix to generate the library with the architecture name for Qt > 5.14 (before the lib was renamed which prevented debugging). Remove rpaths as they are not used on android and generate warnings. Update target and defines to comply with android's Build System Maintainers Guide. Remove stripping step in Qt.android_support as androiddeployqt actually does the stripping. Change-Id: I46a273c1cded753223c7b759670477815b625267 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Android: Update sdk/ndk/tools versionsRaphaël Cotty2020-11-181-1/+1
| | | | | | | | | build-tools: 29.0.3 NDK: 21.3.6528147 SDK Platform: 29 Change-Id: I6d281aa2e914d7567fa2d57698146465b41838d7 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* Android: Remove targetName suffix from QtApplicationRaphaël Cotty2020-10-231-1/+3
| | | | | | | | | | | | | From Qt 5.14 target suffix is required for the multi arch packaging. This only affects android applications using Qt. The suffix can't be applied in QtApplication because a project using CppApplication and depending on Qt.core won't have it. Beside using targetName is error prone as the user can change it. So instead of using targetName for the suffix this patch adds the suffix when deploying the "android.nativelibrary" for packaging and only for Qt applications. Fixes: QBS-1608 Change-Id: I0704d5433c8a1d513dfdef71cecbc99ea5458181 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Android: Update for Qt 5.15Raphaël Cotty2020-10-211-0/+16
| | | | | | | | | | | | Use java.additionalClassPaths property to allow compilation of binding classes because starting with Qt 5.15 they depend on QtAndroid.jar Update AndroidManifest.xml with uses-sdk node using new properties Android.sdk.minVersion and Android.sdk.targetVersion because Qt 5.15 uses androiddeployqt to set it. Fixes: QBS-1580 Change-Id: I2fa5e77bb183be1b55e9dd9756fb7b6eb1f3c9d4 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* Android: Add support to generation of aab packageRaphaël Cotty2020-06-252-30/+125
| | | | | | | | | This patch adds the Android.sdk packageType property which sets the target application. By default (previous behavior) qbs generates an apk package. When set to aab, qbs generates instead an aab package Change-Id: Ic09776d08e2a2ecd68fb4c08881201a7a0a25240 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Android: Add option to use aapt2 instead of aapt in Android.sdk moduleRaphaël Cotty2020-06-042-3/+221
| | | | | | | | | | | aapt has been deprecated (https://developer.android.com/studio/command-line/aapt2) and replaced by aapt2. PropertyOption aaptFileName allows those value: "aapt" and "aapt2". Default value is set to "aapt" for the moment. Fixes: QBS-1562 Change-Id: I1970cafaa54a0e035c08ffe5f9967b712f5c5253 Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Android: clean flagsRaphaël Cotty2020-05-134-50/+16
| | | | | | | | | | | | | | | | | | | | | | Update flags following those changes: https://codereview.qt-project.org/c/qt/qtbase/+/268268 https://codereview.qt-project.org/c/qt/qtbase/+/271909 https://codereview.qt-project.org/c/qt/qtbase/+/278646 Remove support to ARMv5 (armeabi), MIPS, and MIPS64 because its support was ended in r17 and minimum ndk is r19... Remove gdb server as it's not needed anymore since by qtcreator (since 4.9 IIRC) From https://android.googlesource.com/platform/ndk/+/master/docs/BuildSystemMaintainers.md Adding linker flags: --build-id=sha1 : Additional Required Arguments section --gc-sections : Controlling Binary Size section Fixes: QBS-1496 Change-Id: Id522bf6bb736c58244aa511189f7acdd0525ab12 Reviewed-by: BogDan Vatra <bogdan@kdab.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Android: handle relative sourceset directoriesAlberto Mardegan2020-02-051-7/+7
| | | | | | | | | Allow the resourcesDir, sourcesDir and assetsDir to be specified as relative paths. Also, change their type to `path`, as that better fits their role. Change-Id: I76df92fe763154f80ca3759e15de3ad70173632b Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Android: Update support to qt 5.14 and multi-arch apks for Qt appsRaphaël Cotty2020-02-042-1/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before qt 5.14. The profile property "moduleProviders.Qt.qmakeFilePaths" is set with one or more paths to the different android architectures. Each qmake path belongs to a different android architecture installation. So each qmake is used to generated the Qt module corresponding to the architecture. Although qbs can generate multi-arch apks using multiplex mode, this is not possible when the project depends on qt libraries. This is because of the restriction of the qt tool androiddeployqt used by qbs. Now with qt 5.14. All android architectures are installed in the same directory. So the profile property "moduleProviders.Qt.qmakeFilePaths" is set with one qmake path. This directly impacts the qbs-setup-android tool and the generation of the Qt modules. Because qt libraries are installed in the the same directory, they have the abi in their name (libQt5Core_armeabi-v7a.so). So the rules that generate the apks are also impacted. The new androiddeployqt have a new interface (json config file format and requires to have the input libraries installed in the deployment directory) which allows the generation of multi-arch apks. So Qt.android_support modules needs to be updated as well. Fixes: QBS-1497 Change-Id: Ibd546f356c38a05f42dfcac0a4ec92bd82d6f700 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Android: allow reading resources from local folderAlberto Mardegan2020-01-021-1/+1
| | | | | | | | | | | | | | | | When adding a `src/main/res` folder, the `aapt` command starts failing with a bunch of errors like this: <project-path>/default/lingualonga.38c8076f/deployqt_out/res/values-in/strings.xml:3: error: Resource at ministro_not_found_msg appears in overlay but not in the base package; use <add-resource> to add. According to some online source ([1]), this is due to the presence of multiple `-S` options to specify resource paths, and can be fixed by adding the `--auto-add-overlay` option. [1]: https://stackoverflow.com/questions/11569393/how-can-i-use-multiple-s-values-with-aapt-without-using-add-resource Change-Id: Ib1c5741e0194ac1866eb081e0461ac37c80f315c Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* Android: Set a buildable default package nameBogDan Vatra2019-04-291-1/+6
| | | | | Change-Id: Ia7edff17b4485d521177e9e87f1dd8d41c91c32a Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Android: Nuke mips[64] abi supportBogDan Vatra2019-04-262-11/+5
| | | | | | | Mips' abis were removed long time ago from the Android NDK Change-Id: I8d006b6758ee4faa7f2d697a7252981470d43e1a Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Default to the minimum supported NDK API versionBogDan Vatra2019-04-261-2/+10
| | | | | | | | | - android-16 will be used for 32 bit arm ABIs - android-21 will be used for all 64 bit ABIs and x86. x86 has broken wstring support in android-16 to android-19. Change-Id: I38f6e6ec3f16c172cb0b061cfc4cc9efdb8f1700 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Android: Nuke support for old NDKsBogDan Vatra2019-04-252-76/+25
| | | | | | | | | | | | | | | | - Support NDK only r19+ - Remove deprecated and unsupported stl libs: "system", "gabi++_static", "gabi++_shared", "stlport_static", "stlport_shared", "gnustl_static", "gnustl_shared" - Fix armv7a link (we need to link against libc++.[a/so].API) - Use lldb - Use llvm bin utils [ChangeLog][Android] Support NDK only r19+, remove deprecated and unsupported stl libs, use lldb and llvm bin utils Change-Id: If9d5d5462dffb6c9bf481f910ee2c3ba03bc5649 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* [Android] Allow the user to override version attributesBogDan Vatra2019-04-241-1/+6
| | | | | | | | Allow the user to override the android::versionCode and android::versionName from QBS project file. Change-Id: I437294e8f6b52c1072bb1c992d1c7ac5233896c9 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Android: Auto-detect Android.ndk.platformChristian Kandeler2019-04-053-21/+51
| | | | | | | ... the same way as Android.sdk.platform. Change-Id: I974fdfd9f56f312cbd39ea155d87694622a9c0b8 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Android: Check for valid package name upon package creationChristian Kandeler2019-02-271-1/+10
| | | | | | | | | That's nicer than letting users get a cryptic error message when they try to install their package on the device. Change-Id: Ie5321a28475f879f991c4440c7e64c1c3ebd5a9d Fixes: QBS-1428 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Android: Remove "noexecstack" assembler optionChristian Kandeler2019-02-131-1/+1
| | | | | | | | | It's redundant (we also specify this when linking), and it can cause warnings with clang. Fixes: QBS-1424 Change-Id: I71a9331ac0385c53266ef702d192b4a95d1055ba Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Android: Convert to new-style property access syntaxChristian Kandeler2018-10-191-6/+4
| | | | | Change-Id: Ie8a6972b5daf5cd1ef98bde65ed4db856ad4a735 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Android: Enable building apps with native code and no multiplexingChristian Kandeler2018-10-191-1/+1
| | | | | | | | | | | Until now, we needed to either put the native part into its own product or use multiplexing with the "APK product" serving as the aggregate. Now it is also possible to use a single product without multiplexing, which is a more natural approach in the case where there is only one architecture. Change-Id: I976168c99f75ad8e4940ac61f957c64ad29f5f5c Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Android: Update compiler flagsChristian Kandeler2018-10-151-31/+6
| | | | | | Fixes: QBS-990 Change-Id: I185890808af1839a23c1551fe5554be40822561b Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Android: Make sure the manifest file has the right package nameChristian Kandeler2018-10-122-3/+33
| | | | | | | | This prevents Android.sdk.packageName to get out of sync with the respective entry in the manifest file. Change-Id: I9cc8af5f74da2515d094b3988104f5037a12574a Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Merge 1.12 into masterChristian Kandeler2018-10-122-10/+28
|\ | | | | | | Change-Id: I96c735aeda89e02f1fa9107ecfc10ebf4b554dbc
| * Android support: Adapt to changes in newer revisionsChristian Kandeler2018-10-111-6/+21
| | | | | | | | | | | | | | | | Revision 17 dropped some architectures, revision 18 removed GCC. We also missed some earlier changes to clang-related paths. Change-Id: Ie2fa1891f7f4de28e18ea6caadce9eac964bb523 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Android: Allow additional assets and resourcesChristian Kandeler2018-10-111-4/+41
| | | | | | | | | | | | | | | | | | | | | | Until this patch, we were limited to the assets and resources located in Android.skd.assetsDir and Android.sdk.resourcesDir, respectively. Now additional assets and resources, possibly auto-generated, are considered as well. Change-Id: I9577c81ccff94624a70cf706f55ddaa8e0b68992 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Android: Rewrite the rules gathering binaries for packagingChristian Kandeler2018-10-043-76/+91
| | | | | | | | | | | | | | | | | | | | | | These rules were unnecessarily complicated; in particular, the indirection via a text file for the gdbserver and STL binaries was not needed. This also fixed the gdbserver file name in the package: It has to be libgdbserver.so, rather than just gdbserver as on the host. Change-Id: I2315660983904e8b922164be9054d6bba51f852d Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Android: Properly support the aidl toolChristian Kandeler2018-08-271-2/+10
| | | | | | | | | | | | | | | | 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>
* | Enable the Application item to create Android appsChristian Kandeler2018-08-103-9/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The formerly required AndroidApk item is no longer needed: We just tag the APK file as an application and let the Application item pull in the Android.sdk module for Android targets. It is also possible to have native code directly in the Application product; in that case, the multiplexed variants become dynamic libraries and the APK file is built for the aggregate. [ChangeLog] The AndroidApk item was deprecated, a normal Application item can be used instead. Change-Id: I04f5f3892f354ca9eb4f2da8055abcd8d072aba0 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Report an error on unexpected output tagsChristian Kandeler2018-07-131-1/+1
| | | | | | | | | | | | | | | | | | | | The artifacts a dynamic rule produces need to be consistent with what it declares in its outputFileTags property. Somewhat suprisingly, such a check was missing so far, so we managed to make such mistakes in our very own modules. These are also fixed here. Change-Id: I9052a8c4b0423e8fd146c9fc67bf5c3ce752c638 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Remove the base module import from shared imports and modulesJoerg Bornemann2018-06-222-2/+0
|/ | | | | Change-Id: I5270e033dc41b5bd76a417099514c69cc073008b Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Merge 1.10 into 1.11Christian Kandeler2018-01-261-1/+0
|\ | | | | | | Change-Id: Ib49f863008a9c4a3b8956686de019e2f133c244f
| * Add better module validation for Android SDK and NDKJake Petroules2018-01-252-7/+27
| | | | | | | | | | | | | | | | Users now get more friendly error messages when the SDK and/or NDK are not installed. Change-Id: Icfc438ed16b88aea190bf766ddc58b26b0512121 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Merge 1.10 into masterChristian Kandeler2017-12-151-0/+2
|\| | | | | | | Change-Id: Iab942ed25d06038cf8c172eb70dcd8e9a720e1c8
| * Fix Android builds in release mode with NDK r12 and aboveJake Petroules2017-12-151-0/+2
| | | | | | | | | | | | Task-number: QBS-1256 Change-Id: I286327f8b33ecb72851551bbbf2108717a116b1a Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Produce friendlier error messages when the Android SDK/NDK are missingJake Petroules2017-11-292-4/+26
|/ | | | | Change-Id: I4a447d3c18e79523441d3f7103827db55b46a851 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>