The commit 1180d5b8a270cfe7bd1c501c892d1c38ee7425de added information
about the ndk and android api level used at build time, ndk version has
already been accounted for in b73d6f3be8.
This now accounts for "platforms;android-xx" and "build-tools;xx.x.x"
packages.
Fixes: QTCREATORBUG-30404
Change-Id: I78b8885b88294404bc29c41a7b9491a331fcd709
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
When building using CMake it's possible that single CMakeLists.txt may
contain multiple android executables. In this case android-build
directory mixes the build artifacts from multiple targets. This patch
allows using per-target android-build directories in case if Qt support
this. The QT_INTERNAL_ANDROID_TARGET_BUILD_DIR_SUPPORT cache variable
indicates that Qt has builtin support of this feature and the
QT_USE_TARGET_ANDROID_BUILD_DIR cache variable should be set to TRUE
by user to enable the functionality project-wide.
Task-number: QTBUG-117443
Change-Id: Ic8f576e528ee918a3ebf075a25fa2a414ef85736
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
They are reasonably standardized, and generally usable cross-plugin,
so this can help to avoid a few cross-plugin compiletime dependencies.
Change-Id: Icb2b010c3e12dee69df54ab16f6f8e90d9cffba6
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This will use the available information from modules/Core.json
and determine the abi version from the "compiler_target" used to build
Qt.
This is only available with Qt6. Qt 6.4 and 6.5 have this information.
Otherwise the "android-clang" qmake mkspec will be parsed and evalauted
to get the Qt ABIs.
Change-Id: Ia0c73f5c87983f44a156b54335dc8b36698c15b2
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
When building the project in QtCreator using the Debug configuration,
android deployment procedure pulls app_process from the device to
establish the debug environment. This operation litters the project
build directory with the libraries and executables that don't belong
to it. Instead of pulling the files to the root build directory, it's
better to isolate these files using subdirectory.
Fixes: QTCREATORBUG-29336
Fixes: QTBUG-113851
Fixes: QTBUG-111284
Change-Id: I32c3403dc5f79c42b1ff2bd676c2cf3ae8d43ec3
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Since a long while, an ndk within an Android SDK installation resides
under a subdirectory "ndk/<ndkversion>". The "ndk_path" entry in
sdk_definitions.json is therefore redundant, since the ndk version is
already present.
Qt 6.5+ will provide the ndk version number (see QTCREATORBUG-28629),
without such ndk_path, and therefore it is helpful to contruct the ndk
subpath directly from that version number. For all Qt versions.
This change removes the "ndkPath" entry and the code that handles it.
Task-number: QTCREATORBUG-28629
Change-Id: I5a8f204f87a53a610dbeb9d4c39633582ef209c1
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
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>
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>
Recent SDK Manager that is used by Qt Creator works with JDK 11+,
and JDK 11 is needed by Qt 5.15.7+, so look for the newest JDK
instead of 1.8 as currently being done.
Change-Id: I6ff415aa300d742735e8636b24a03116d5bfe2b6
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
The cmdline-tools package used to have the folder structure "tools/bin".
However, latest packages are using the structure "cmdline-tools/bin".
And since subsequent updates we are installing "cmdline-tools;latest"
package, it will be put in "cmdline-tools/latest" folder, so we cannot
extract to that path, or otherwise sdkmanager will complain that the
path is in use.
Currently we extract it and put it under the SDK path, then use it to
install the essential packages, then it won't be used at all. This patch
changes that by extracting the downloaded package into a temporary
location, and use sdkmanager from there directly.
Also, this patch updates the links to the cmdline-tools along the way.
Fixes: QTCREATORBUG-27174
Change-Id: I1f5d0e38f5a026631e8a3852821d85a69d543c32
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
The AVD specific fields don't need to be carried out by QtC settings,
these can be read from the AVD's config file when they are needed.
This also is good because those values can change at any time,
either manually or by some other IDE like Android Studio, and thus
we don't really need to manage them ourselves.
The fields in question are: skin name, target name, sdcard size,
openGL status.
Change-Id: I86163500ec2fed035e32ec02ed17e182778db4a7
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
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>
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>
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>
BuildStepConfigWidget with manual tweaks is good enough.
Also move AndroidDeployQtStepFactory to the usual place at the
end of the file.
Change-Id: I92af31ef77f986b6fcd84a14ac62b70e2da32ff2
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Revert the IDs back to what they were.
Amends 26463a2219
Fixes: QTCREATORBUG-22564
Change-Id: I220e362793d525ee8f01ff9649feb2cdfc37bba3
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
That's what it is, and it's the only odd one out currently.
Change-Id: If098e2691b9f88fbd5f516cf869e390f43b9ddfa
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Now we can use QtCreator to build, deploy, run & debug QBS projects.
[ChangeLog][Android][QBS] Add Android support for QBS projects.
Fixes: QTCREATORBUG-15573
Fixes: QTCREATORBUG-19880
Fixes: QTCREATORBUG-22182
Change-Id: I08b153a44dcf7ca178689c1c30fa2201c4cc0dbb
Reviewed-by: hjk <hjk@qt.io>
Requirements:
- NDKr19 or newer
- Qt 5.12.1 or newer
QtCreator supports the following variables:
- ANDROID_PACKAGE_SOURCE_DIR
- ANDROID_EXTRA_LIBS
Be aware, that there is a lot of magic done on QtCreator side, and you
can't use only cmake to build an Android APK.
[ChangeLog][Android][CMake] Add Android support for CMake projects.
Change-Id: I1d351976ed56f424c2bc972f4ff7b5968147a2ed
Reviewed-by: hjk <hjk@qt.io>
The remaining dependency is hacked into QmakeProjectManager
by using a compile time-only dependency on androidconstants.h.
Change-Id: Id78125137bc75c145a072bc753276abbf0029647
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
This uses the same approach as in the previous patches: Have some
generic interface in the base classes (here ProjectNode::targetData()
setTargetData()) and implement on the qmake project side.
Implementation for Cmake/QBS is architecture-wise possible, but
not used right now, and left for later.
Change-Id: I3bbf66170020cf9027a894cd66db15ec7ffbf499
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
We have nowadays two ways to pass data from run configurations to
tool that do not require intimate knowledge of the sender:
1. Using RunConfigurationAspects, accessible for all workers in a
RunControl
2. Using RunWorker::recordData for an individual worker.
This removes the need to use specific fields in a runnable and
means that a tool plugin can be better separated from target plugins.
The approaches are not mutually exclusive, both use an string-ish
id, I chose here to use the same string when using both.
This patch here uses approach 2. for the GammaRay/Android combo.
It also fixes a (harmless) typo (s/POSTSTART/POSTFINISH).
Change-Id: I4048693ca73b17253a39bfcacc9e1880ecf25736
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
There's nothing Qmake related in there (anymore?).
Change-Id: I8842d4824065cf3cba61d50b6f333ec3b52e3851
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
Each kind of Device used to add its own top-level preference page, with only a single
tab in each, which makes the list of categories almost irrelevant.
Regrouping all these under the 'Devices' category makes the settings page much more
consistent and reduces the clutter.
Change-Id: I72c04b57004c2e1b1f57208bdaabe8b944390558
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Broken in e6d1141e1e,
which changed the code to use typeId() instead of type() but
didn't change to what it was compared.
Change-Id: I5b4f76395bd193ee30ee606023483d3bd0b062e8
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
- Split up androiddeployqt into two steps: One building the apk,
and one deploying it to the device.
- The build apk step base class AndroidBuildApkStep is ihneritaged by
the qmake specific class QmakeAndroidBuildApkStep.
- The deployment step is still called androiddeployqt
- Move all qmake specific code to the qmakeprojectmanager plguin
- Flip the depencency between the android and qmake plugin, now
the qmake plugin depends on the android plugin, implementing
a interface the android plugin provides.
- Note: This removes the debug deployment for now.
Change-Id: I1c386640159ed14b637668abde8eb3b9009ab803
Reviewed-by: BogDan Vatra <bogdan@kde.org>
Indentation for blocks '{'. '}' and completion for keywords.
TODO: "New File" is missing,
TODO: probably needs some tweaks to the indentation.
Task-number: QTCREATORBUG-11220
Change-Id: I758b3815e47d1427d39c0248eb16e39ffb7a29fb
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>