summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTinja Paavoseppä <tinja.paavoseppa@qt.io>2024-05-08 13:55:35 +0300
committerTinja Paavoseppä <tinja.paavoseppa@qt.io>2024-05-15 12:34:08 +0300
commite59f3100615e5ca52530f284a98d01627b826fae (patch)
treedd6f9ad505c5b92111add228a2753595a95643d0
parentb740cd1f38e8fa08e61cee1d7a19badaff2dd282 (diff)
androiddeployqt: Add a placeholder for plugin type in build.gradle
This allows to later change the plugin type based on the options provided for the androiddeployqt, such as when building an AAR. Task-number: QTBUG-116955 Task-number: QTBUG-65567 Change-Id: I6314c8ab9edccbf953ae48543d5a002a9f807581 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
-rw-r--r--src/android/templates/build.gradle3
-rw-r--r--src/tools/androiddeployqt/main.cpp1
2 files changed, 3 insertions, 1 deletions
diff --git a/src/android/templates/build.gradle b/src/android/templates/build.gradle
index de37b5ea6b..a104687f4e 100644
--- a/src/android/templates/build.gradle
+++ b/src/android/templates/build.gradle
@@ -14,7 +14,7 @@ repositories {
mavenCentral()
}
-apply plugin: 'com.android.application'
+apply plugin: qtGradlePluginType
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar', '*.aar'])
@@ -29,6 +29,7 @@ android {
* - qtAndroidDir - holds the path to qt android files
* needed to build any Qt application
* on Android.
+ * - qtGradlePluginType - whether to build an app or a library
*
* are defined in gradle.properties file. This file is
* updated by QtCreator and androiddeployqt tools.
diff --git a/src/tools/androiddeployqt/main.cpp b/src/tools/androiddeployqt/main.cpp
index 831b1361ce..cbe6336c97 100644
--- a/src/tools/androiddeployqt/main.cpp
+++ b/src/tools/androiddeployqt/main.cpp
@@ -2850,6 +2850,7 @@ bool buildAndroidProject(const Options &options)
abiList.append(it.key());
}
gradleProperties["qtTargetAbiList"] = abiList.toLocal8Bit();// armeabi-v7a or arm64-v8a or ...
+ gradleProperties["qtGradlePluginType"] = "com.android.application";
if (!mergeGradleProperties(gradlePropertiesPath, gradleProperties))
return false;