QT_ANDROID_GRADLE_MULTI_MODULE
Builds the Android package from a multi-module Gradle project.
This variable was introduced in Qt 6.12.
Note: This variable is in technology preview and may change in future releases.
Note: This variable is used only if targeting the Android platform.
Set this variable to TRUE to package an application from a Gradle project that has one module per Android artifact, an app module for the application and one module for each dynamic feature:
<build>/android-build-<target>/
app/ # the application module
<feature_1_target>/ # Dynamic feature 1
<feature_2_target>/ # Dynamic feature 2
settings.gradle # includes app and other dynamic featuresFeature modules are what Play Feature Delivery builds on, so qt_add_android_dynamic_features() requires this variable, see qt_add_android_dynamic_feature_java_source_dirs. For a complete project that uses it, see Using Play Feature Delivery.
Note: Using Dynamic features doesn't support multi-ABI yet.
Set the variable when configuring the project:
qt-cmake -S <source_dir> -B <build_dir> -DQT_ANDROID_GRADLE_MULTI_MODULE=ONor early on before qt_add_executable() so that it is known before the executable is created:
set(QT_ANDROID_GRADLE_MULTI_MODULE ON)The variable also decides what builds the package. By default, CMake writes a deployment settings file and hands the rest to androiddeployqt, which resolves the Qt dependencies, copies them into the build directory, and runs Gradle from there. With the variable enabled, CMake deploys the dependencies itself as regular build steps and generates the Gradle files of every module. The apk and aab targets then run Gradle directly, and androiddeployqt isn't involved at all. The application is packaged from android-build-<target>/app, and the deployed files are build dependencies of the package. This option is generally faster and simpler since it relies on the CMake build graph and doesn't rely on additional deplyoment tools.
The variable is available since Qt 6.11 as QT_USE_ANDROID_MODERN_BUNDLE. That name is deprecated since Qt 6.12, but is still honored if set.
See also QT_USE_TARGET_ANDROID_BUILD_DIR and qt_add_android_dynamic_feature_java_source_dirs().
© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.