android/app/appSettings.gradle.in | 2 +- configure.ac | 20 ++++++++++++++++++-- 2 files changed, 19 insertions(+), 3 deletions(-)
New commits: commit 13df6114036a171f99b05f75388fa304b412e42e Author: Jan Holesovsky <ke...@collabora.com> AuthorDate: Wed Nov 6 21:52:02 2019 +0100 Commit: Jan Holesovsky <ke...@collabora.com> CommitDate: Thu Nov 7 09:39:48 2019 +0100 android: Allow specifying the versionCode from ./configure. Change-Id: If3f618bd836d236e76bd4698321ec7314ebac1a4 Reviewed-on: https://gerrit.libreoffice.org/82177 Reviewed-by: Jan Holesovsky <ke...@collabora.com> Tested-by: Jan Holesovsky <ke...@collabora.com> diff --git a/android/app/appSettings.gradle.in b/android/app/appSettings.gradle.in index d872ef2ea..960ceee9e 100644 --- a/android/app/appSettings.gradle.in +++ b/android/app/appSettings.gradle.in @@ -7,6 +7,6 @@ ext { } android.defaultConfig { applicationId '@ANDROID_PACKAGE_NAME@' - versionCode 20 + versionCode @ANDROID_PACKAGE_VERSIONCODE@ versionName '@LOOLWSD_VERSION@' } diff --git a/configure.ac b/configure.ac index 7980cb0f4..159204888 100644 --- a/configure.ac +++ b/configure.ac @@ -111,8 +111,13 @@ AC_ARG_ENABLE([androidapp], message plumbing point of view.])) AC_ARG_WITH(android-package-name, - AS_HELP_STRING([--with-android-package-name="org.libreoffice.androidapp"], - [Set Android package name of the build.]), + AS_HELP_STRING([--with-android-package-name="org.libreoffice.androidapp"], + [Set Android package name of the build.]), +,) + +AC_ARG_WITH(android-package-versioncode, + AS_HELP_STRING([--with-android-package-versioncode=20], + [Set the versionCode for the Android package.]), ,) AC_ARG_WITH([app-name], @@ -352,6 +357,7 @@ AC_SUBST(LOKIT_PATH) ENABLE_ANDROIDAPP= ANDROID_PACKAGE_NAME= +ANDROID_PACKAGE_VERSIONCODE= if test "$enable_androidapp" = "yes"; then ENABLE_ANDROIDAPP=true @@ -363,10 +369,20 @@ if test "$enable_androidapp" = "yes"; then ANDROID_PACKAGE_NAME="$with_android_package_name" AC_MSG_RESULT([$ANDROID_PACKAGE_NAME]) fi + + AC_MSG_CHECKING([for Android package versionCode]) + if test -z "$with_android_package_versioncode" -o "$with_android_package_versioncode" = "no"; then + ANDROID_PACKAGE_VERSIONCODE="1" + AC_MSG_RESULT([not set, using $ANDROID_PACKAGE_VERSIONCODE]) + else + ANDROID_PACKAGE_VERSIONCODE="$with_android_package_versioncode" + AC_MSG_RESULT([$ANDROID_PACKAGE_VERSIONCODE]) + fi fi AC_SUBST(ENABLE_ANDROIDAPP) AM_CONDITIONAL([ENABLE_ANDROIDAPP], [test "$ENABLE_ANDROIDAPP" = "true"]) AC_SUBST(ANDROID_PACKAGE_NAME) +AC_SUBST(ANDROID_PACKAGE_VERSIONCODE) APP_NAME="LOOL" if test -n "$with_app_name"; then _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits