Qt Gradle Plugin 1.4 (QtGP) is now "at your service, M'am!" A tool that is used by Qt Tools for Android Studio and Qt Quick for Android projects like the Qt Quick for Android API examples. It is available for you via Maven Central like any Gradle plugin. If you missed QtGP version 1.3, check out the previous blog post. Now, let’s dive into what’s new in 1.4!
Previously qt.path, qt.abiPath, and ABI‑related CMake arguments handling could produce unexpected or inconsistent build results, especially when ABI variables were partially specified or when multiple conflicting ABI sources were used. The ABI‑selection logic was re-designed to follow a predictable priority order, ensuring single‑ABI, multi‑ABI, and “build‑all” scenarios behave exactly as the user intends. Also warnings or errors were improved, when configurations are ambiguous or contradictory.
Hard‑coded Qt paths from the build.gradle(.kts) file caused portability issues, frequent build and sync errors, and a poor out‑of‑the‑box experience—especially for new users. Using that within the QtBuild block is now deprecated. The API examples had paths as hard-coded, now that can change in later Qt versions, earliest in Qt 6.12.0. As a solution, QtGP 1.4 now enabled alternative ways to define them. All of them are listed below in preferred priority order.
Gradle project properties:
1. Configuring as terminal parameters
Check more information from the QtGP 1.4 documentation.
QtGP will automatically determine whether to perform a single‑ABI or multi‑ABI build based on the qtPath. QtGP can now detect whether qtPath points to a full multi‑ABI Qt installation or a single‑ABI build. At the same time, the old Qt ABI Path variable is deprecated, with warnings added to guide users toward relying solely on qtPath for ABI detection. This simplifies configuration, removes redundant settings, and makes ABI handling more predictable.
QtGP is now built with Gradle version 9.3.0, like in the rest of the Qt Quick for Android and Qt for Android.
To see the full list of bugs, see "depends on" Jira items from QtGP 1.4 Epic. We fixed a suite of issues around poor validation and error handling summary below.
Do you have any features you would like to see added to the plugin? Bugs that make your life harder? Comment below! You can track work progress and provide feedback at bugreports.qt.io.
ps. Publishing to Maven Central is done with nmcp. Huge kudos to the ncmp project for making the plugin publishing so easy!