summaryrefslogtreecommitdiffstats
path: root/mkspecs/features/android
diff options
context:
space:
mode:
authorAndy Shaw <andy.shaw@qt.io>2018-10-15 09:23:26 +0200
committerAndy Shaw <andy.shaw@qt.io>2019-02-04 16:57:07 +0000
commit9435526d507611b8b54f7c65df9febdde193c7bf (patch)
tree49544be7f75214b6f8710e9c6cbae3cee25ac7b5 /mkspecs/features/android
parent29d5a287abc3d3c9b75619db18042dea66236cb3 (diff)
qmake: Add variables for setting the version number and name in Android
This makes it much easier to have the version information set for an Android APK without having to manually modify the AndroidManifest.xml each time. [ChangeLog][Android][qmake] Can now set the version name and code for Android using ANDROID_VERSION_NAME and ANDROID_VERSION_CODE respectively in the pro file. Change-Id: Ie6813bc3a7444f7baa5e772b93bc2695d9b81e57 Done-with: Markus Maier <markus.maier@rosenberger.de> Reviewed-by: Markus Maier <markus.maier@rosenberger.de> Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Diffstat (limited to 'mkspecs/features/android')
-rw-r--r--mkspecs/features/android/android_deployment_settings.prf8
1 files changed, 8 insertions, 0 deletions
diff --git a/mkspecs/features/android/android_deployment_settings.prf b/mkspecs/features/android/android_deployment_settings.prf
index 0db3230ce7..ad826bdad3 100644
--- a/mkspecs/features/android/android_deployment_settings.prf
+++ b/mkspecs/features/android/android_deployment_settings.prf
@@ -58,6 +58,14 @@ contains(TEMPLATE, ".*app"):!build_pass:!android-embedded {
!isEmpty(ANDROID_PACKAGE_SOURCE_DIR): \
FILE_CONTENT += " \"android-package-source-directory\": $$emitString($$ANDROID_PACKAGE_SOURCE_DIR),"
+ # Android-specific version string
+ !isEmpty(ANDROID_VERSION_NAME): \
+ FILE_CONTENT += " \"android-version-name\": $$emitString($$ANDROID_VERSION_NAME),"
+
+ # Android-specific version number
+ !isEmpty(ANDROID_VERSION_CODE): \
+ FILE_CONTENT += " \"android-version-code\": $$emitString($$ANDROID_VERSION_CODE),"
+
!isEmpty(ANDROID_EXTRA_LIBS): \
FILE_CONTENT += " \"android-extra-libs\": $$emitString($$join(ANDROID_EXTRA_LIBS, ",")),"