summaryrefslogtreecommitdiff
path: root/src/plugins/android/androidmanager.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Utils: Rename qtcprocess.{cpp,h} -> process.{cpp,h}Jarek Kobus2023-05-041-1/+1
| | | | | | | | Follows QtcProcess -> Process rename. Change-Id: I97235a9a40cb7fd52944515b7ab878d96528f919 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Utils: Rename QtcProcess -> ProcessJarek Kobus2023-05-041-4/+4
| | | | | | | | Task-number: QTCREATORBUG-29102 Change-Id: Ibc264f9db6a32206e4097766ee3f7d0b35225a5c Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: hjk <hjk@qt.io>
* Android: Skip "Make Install" and "Build APK" if not ProductType::AppAlessandro Portale2023-04-061-0/+15
| | | | | | | | | | | If the target's product type is not "App", the "Make Install" and "Build Android APK" build steps need to be skipped. Fixes: QTCREATORBUG-26980 Change-Id: Ia8bb61d407d040b851a74bad3d23876a7d31af73 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Android: Update SDK manager tree displayAlessandro Portale2023-03-221-2/+2
| | | | | | | | Adopt latest naming in Android Studio. Change-Id: I524adf5858933fddefe496db434b2fdca029d18f Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Merge remote-tracking branch 'origin/10.0'Eike Ziller2023-03-131-9/+6
|\ | | | | | | | | | | | | Conflicts: src/shared/qbs Change-Id: I33e13270c8c15a51b4ce4eaa6b4584041ed124e0
| * Android: Remove unreachable returnOrgad Shaneh2023-03-061-9/+6
| | | | | | | | | | | | | | Reported by Coverity. Change-Id: Id1b67f0adae3ff0c9157428726778c8c3b2a03a7 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* | ProjectExplorer: Move some not-fully-session related bitshjk2023-03-011-1/+1
|/ | | | | | | | | | | | | | | ... out of SessionManager. The idea is to later move SessionManager into the Core plugin, which both is sensible conceptually and also prerequisite to merge the Bookmark plugin into TextEditor plugin. Currently, only the interface is split, as the load/save implemetations are non-mechanical to disentangle. Change-Id: I31631db3094ea192825a2ccaa6add6188662940b Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* Android: Fix opening of package location after buildAlessandro Portale2023-02-231-7/+28
| | | | | | | | | | | Fixes and consolidates into one common function the package path retrieval for the eight combinations of: (apk|aab)(debug|release)(signed|unsigned) Fixes: QTCREATORBUG-28791 Change-Id: I6e8c54f555b95aca448032783938f9f7f89bc653 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Remove GPL-3.0+ from license identifiersKai Köhne2023-01-061-1/+1
| | | | | | | | | | | | | | | Since we also license under GPL-3.0 WITH Qt-GPL-exception-1.0, this applies only to a hypothetical newer version of GPL, that doesn't exist yet. If such a version emerges, we can still decide to relicense... While at it, replace (deprecated) GPL-3.0 with more explicit GPL-3.0-only Change was done by running find . -type f -exec perl -pi -e "s/LicenseRef-Qt-Commercial OR GPL-3.0\+ OR GPL-3.0 WITH Qt-GPL-exception-1.0/LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0/g" {} \; Change-Id: I5097e6ce8d10233993ee30d7e25120e2659eb10b Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Android: Remove gradle.properties file handlingAlessandro Portale2022-11-301-120/+1
| | | | | | | | | | | | | | | | The modification of gradle.properties files was originally a feature of the Android plugin which eventually moved over to androiddeployqt. Moreover, this code got accidentally disabled in Qt Creator 4.10 and was appartently not missed till now. I only noticed it while "FilePath- ifying" code in the Andsroid plugin. This change removes the gradle.properties file handling code from Qt Creator. Fixes: QTCREATORBUG-28494 Change-Id: Id4f2722f4965c877a065386b34a71d8368147b08 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Android: FilePath-ify certificate handlingAlessandro Portale2022-11-301-6/+11
| | | | | | Change-Id: Ic7bf25567ac74555926d105c03cdac5a9e49b5a6 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* Android: Fix clazy "Mixing iterators with const_iterators" warningsJarek Kobus2022-11-301-2/+2
| | | | | | Change-Id: I90fd2c10240a367ef546f9b48b2a2f784f00f4e0 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Android: Revive second half of AndroidManager::updateGradlePropertiesAlessandro Portale2022-11-241-3/+4
| | | | | | | | | | The extra "gradlew" which gets inserted into packageSourceDir makes all paths that are subsequently based on packageSourceDir be invalid. Amends: ded34daa2b62358368a592a8aa39accdc5be1620 Change-Id: Ied7fe12a3d68c27b56eeb4d0ad4ce375ee228f4e Reviewed-by: hjk <hjk@qt.io>
* Android: Code cosmeticshjk2022-11-101-1/+0
| | | | | | Change-Id: I2a877e1f94ba9ef9e8487aa78dee95f89ec16312 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* Android: Convert to using Tr::trAlessandro Portale2022-10-071-7/+7
| | | | | Change-Id: Ie9110093101b0f49808b4da7b13ac3f47c3bb994 Reviewed-by: hjk <hjk@qt.io>
* Replace QtSupport::QtVersionNumber with QVersionNumberAlessandro Portale2022-09-191-3/+3
| | | | | | | Task-number: QTCREATORBUG-27786 Change-Id: I71a44709c264829f629c9dfce702076eda297a77 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: hjk <hjk@qt.io>
* Use SPDX license identifiersLucie Gérard2022-08-261-24/+2
| | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Task-number: QTBUG-67283 Change-Id: I708fd1f9f2b73d60f57cc3568646929117825813 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Drop Qt5: Android, IOS & WASM: Get rid of QOverloadJarek Kobus2022-07-201-2/+1
| | | | | | | | | | Add a context object into some lambdas. Change-Id: I72631aeb36703f8f335f3819796fb52148f1b377 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* Android: Don't quote log lines with path namesAlessandro Portale2022-07-171-4/+5
| | | | | Change-Id: I70f23af46bd6c8318971b20727e4010889bdcebc Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Android: Try harder to get a valid ABI in apkDevicePreferredAbiAlessandro Portale2022-06-291-3/+6
| | | | | | | | | | | | | | | | | For AndroidDeployQtStep::gatherFilesToPull to pull the right app_process, the first attempt at getting the ABI is a peek inside the APK. If that APK does not exist yet (due to clean 1-st time build), it falls back to get the "AndroidAbis" from the project node. That fails in the case of CMake because AndroidAbis is only set by qmake, and never by cmake. Thich change adds another fallback to query "AndroidAbi" instead. Fixes: QTCREATORBUG-27737 Change-Id: I2e944d6d30a61047b4c66ed73211296c87d57b51 Reviewed-by: hjk <hjk@qt.io>
* Utils: use cleaned stdout all over the place againDavid Schulz2022-06-171-2/+2
| | | | | | | Amends 5ee880ce5e6998170823e6fc9afb6b6c36c6170a Change-Id: Ie0202db7d8455372c3697087d9571db6706b45a1 Reviewed-by: hjk <hjk@qt.io>
* Android: Remove foreach / Q_FOREACH usageArtem Sokolovskii2022-05-051-1/+2
| | | | | | | Task-number: QTCREATORBUG-27464 Change-Id: I2530688c44735bc4c69d57f9e8f392867be316f0 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* Android: Align Android SDK display names with Android StudioAlesandro Portale2022-04-081-30/+34
| | | | | | | | | | | Let the SDK packages have the same names as in Android Studio. Including the code name (in brackets) makes things easier for people like me who remember sweets better than numbers. Fixes: QTCREATORBUG-27161 Change-Id: Iedf2d1ebaf5405669c49536258143db5c7570a9e Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Android: rename avdname to avdName in AndroidDeviceInfoAssam Boudjelthia2022-03-141-1/+1
| | | | | Change-Id: I9f4743b0d9f953f1fa407acfea41345571cb9998 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* Merge remote-tracking branch 'origin/7.0'Eike Ziller2022-03-111-0/+2
|\ | | | | | | | | | | | | | | | | Conflicts: cmake/QtCreatorIDEBranding.cmake qbs/modules/qtc/qtc.qbs qtcreator_ide_branding.pri Change-Id: Ic02df53b880d0861d9d9ea0df3e0d381ae99f350
| * Android: display Android 13 packages correctly in sdkmangerAssam Boudjelthia2022-03-071-0/+2
| | | | | | | | | | Change-Id: I49cc45dce0523e55ff56df7e429dd9dc93f46534 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* | QtcProcess: Limit the inclusion of qtcprocess.hJarek Kobus2022-03-021-8/+8
|/ | | | | | | | | | Move the rest of QtcProcess enums to processenums.h. Move ExitCodeInterpreter into processenums.h. Remove superfluous Utils:: prefix. Change-Id: Iaa596f353d33d6930085a621b114cc15a35caa80 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Show Android api 32 as Android 12LAssam Boudjelthia2022-02-011-0/+2
| | | | | | Change-Id: I48122062de4ce3bc092089d73d7bbae5abced73b Reviewed-by: Alessandro Portale <alessandro.portale@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* Utils: Wrap various file system iteration flags and filtershjk2022-01-261-1/+1
| | | | | | | | | | | ... into a single class. This makes passing them around as a whole easier, and opens a path to have "generic" filters in form of a lambda or such. Change-Id: Ibf644b2fedcf0f1a35258030710afff8f5873f88 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* QtcProcess: Get rid of setProcessUserEventWhileRunning()Jarek Kobus2022-01-251-8/+4
| | | | | | | | | | | Introduce EventLoopMode enum and pass it to the QtcProcess::runBlocking() instead. There is no need to store this setting. By default this value is NoEventLoop. Change-Id: Icad98b77bec5280b79039b7e5aa4ec408261521c Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: hjk <hjk@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* Rename QtSupport::BaseQtVersion to QtVersionhjk2022-01-241-5/+5
| | | | | | | | | | ... and the Utils::QtVersion enum to Utils::QtMajorVersion to avoid conflicts. Change-Id: Ib688c67388272b7204a91444155f60b8c18a56bd Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Android: remove unused function that couldn't be removed in 5.0 branchAssam Boudjelthia2021-11-081-5/+0
| | | | | | | | | ... because of binary compatibility. Comes after a2b6dba0bcec4675cbc5c951cfb112296e65d4e4. Change-Id: I18866de39a05c6690b47632cc5503f8555e006da Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* Andriod: declare QLatin1String as char[] instead in AndroidMangerAssam Boudjelthia2021-11-051-7/+8
| | | | | Change-Id: I4f11950dcdfa0caddf02bf2b123ff78a9c01c062 Reviewed-by: hjk <hjk@qt.io>
* Android: FilePathify part of debugger abi detectionhjk2021-11-051-5/+6
| | | | | Change-Id: I3abbc780c1e1301db4c6d367dcdf1dcf8cbf556d Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* Merge remote-tracking branch 'origin/5.0' into 6.0Eike Ziller2021-10-261-1/+14
|\ | | | | | | | | | | | | | | Conflicts: src/plugins/android/androidpackageinstallationstep.cpp src/plugins/cppeditor/cppmodelmanager.cpp Change-Id: I3bad38e1cfe717e98209d49461c9813a8e555eff
| * Android: get build dir based on settings file path for qmake projectsAssam Boudjelthia2021-10-251-1/+14
| | | | | | | | | | | | | | | | | | Check Constants::AndroidDeploySettingsFile path first, and use the buildTarget's workingDir only if that former value is empty. Fixes: QTCREATORBUG-26357 Change-Id: I726a4b5cd60042845988b4428eea03ef0adb9920 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* | Android: remove AndroidDeviceType and State from AndroidDeviceInfoAssam Boudjelthia2021-10-251-1/+1
| | | | | | | | | | | | | | | | | | No need to have these enums which are now only a duplication of IDevice::MachineType and IDevice::DeviceState. Change-Id: Icc3f112f2670c7354bb282b36fad0f0631b9e047 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io> Reviewed-by: hjk <hjk@qt.io>
* | Android: Clean up for extraData constantsAssam Boudjelthia2021-10-061-1/+1
| | | | | | | | | | | | | | | | | | clean, rename and delete unused constants, we well as unify the usage between qmake, cmake, and qbs. Change-Id: I8827ac2f2f7660e337694fef17f744e727bd776a Reviewed-by: Alessandro Portale <alessandro.portale@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* | Fix some warnings about unused variables and functionsChristian Kandeler2021-09-271-1/+0
| | | | | | | | | | Change-Id: I5f0acd9598bc7f3a79963cc4e1b255e2b6fb2e5d Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* | Change device selection mechanism on AndroidAssam Boudjelthia2021-09-211-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, on deploy/debug steps on Android, an AndroidDeviceDialog is popped up each time a deployement is done to select a device. This can be avoidable by using Qt Creator DeviceKitAspect to have the list of devices easily selectable from the project mini-menu. This is better than the current way because it: * reduces the time from deployment to running the app * reduces the number of clicks * avoids having to select the same device each time or * if a default device is selected, this avoids having to go to project settings to reset the default device to be able to deploy to a new device. * it looks cleaner and more compatible with Creator. Task-number: QTCREATORBUG-23991 Change-Id: Ida4ab7245c1a3b0ca26c5ccdc9a21a072edf0725 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* | Merge remote-tracking branch 'origin/5.0'Eike Ziller2021-09-201-5/+38
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | Conflicts: cmake/QtCreatorIDEBranding.cmake qbs/modules/qtc/qtc.qbs qtcreator_ide_branding.pri src/libs/utils/processreaper.cpp src/plugins/android/androidbuildapkstep.cpp src/plugins/cmakeprojectmanager/cmakeprocess.cpp Change-Id: I353a445b5862f63362ea954749b5565360951283
| * Android: Handle Qt 5 CMake projects target build dir retrievalAssam Boudjelthia2021-09-161-2/+24
| | | | | | | | | | | | | | | | This makes sure that Qt 5 CMake android projects return the build dir and not the android build libs folder. Change-Id: I675e2ea2946beb63bbe08b9bf4b7d9603c386f09 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
| * Android: fix for retrieving the path to deployment file and build dirAssam Boudjelthia2021-09-151-5/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Android deployment file for CMake project was constructed based on the main project target and thus was always expecting the file to be under the build folder root path. This makes sure the correct path to the output path is retrieved. This practically different problems with running examples when the main project is a Qt module, for both qmake and cmake. Fixes: QTCREATORBUG-25793 Change-Id: I5fdedd94c7c4c84c351c28476ca14b0f95f99f22 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* | Merge remote-tracking branch 'origin/5.0'Eike Ziller2021-09-131-4/+9
|\ \ | |/ | | | | | | | | | | | | | | Conflicts: src/plugins/clangtools/clangtoolssettings.cpp src/plugins/clangtools/executableinfo.cpp src/plugins/clangtools/executableinfo.h Change-Id: Id8caf63e3e594792467d3447870086bd2d8f73b9
| * Fix minSdkVersion in deploy stepAssam Boudjelthia2021-09-071-4/+9
| | | | | | | | | | | | | | | | | | | | | | Deploy step uses AndroidManager::minimumSDK() which looks for the version in the AndroidManifest.xml file which used to contain the minimum and target sdk, but if the manifest doesn't contain that value, this logic returns 0. So, return the defaultMinimumSDK() in case the first way fails. Change-Id: Id10e552d7c8de4d3544b7fa8f26ae5dd9e974df5 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* | Android: Replace two direct uses of Target::activeRunConfigurationhjk2021-08-311-6/+2
| | | | | | | | | | | | | | | | | | | | ... by Target::activeBuildKey. This is effectively the same problem under the hood, but isolates it a bit. Change-Id: Ie37a4d67aab3e044bb99b7b8d2bd7900198c5538 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* | Merge remote-tracking branch 'origin/5.0'Eike Ziller2021-08-261-2/+7
|\ \ | |/ | | | | | | | | | | | | Conflicts: qbs/modules/qtc/qtc.qbs src/plugins/android/androidconfigurations.cpp Change-Id: If8dc2cdf131811e08ca147c6f58dbb3ed3bf7227
| * Android: Get the minimum sdk level based on the used Qt versionAssam Boudjelthia2021-08-261-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | Currently, Creator gets the minimum sdk version from a hard-coded value (16) which is used for all projects. However, this is not ideal because some Qt versions require a specific sdk level to build and run properly. So, this change ensures that the minimum sdk value is obtained based the Qt version used in the project. Fixes: QTCREATORBUG-26127 Change-Id: I948dd18d16c3d9ca587ad7712aa4c9a1bfd53972 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* | Android: Use FileUtils in AndroidDeployQtStep::createConfigWidgethjk2021-08-241-2/+2
| | | | | | | | | | Change-Id: Ib2ca0dbcdc811a6c130bf921845484b95039d076 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* | Utils: Introduce a FilePath constructor from char arrayshjk2021-08-171-2/+2
|/ | | | | | | | | | | | Similar to QT_RESTRICTED_CAST_FROM_ASCII to avoid the need for decorations in user code. At the same time, drop some convenience constructors and functions in CommandLine and Icon essentially serving the same purpose. Change-Id: Ida4e5ac19c2da0a4298a97b2a8e1511d56bbb79d Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christian Stenger <christian.stenger@qt.io>