summaryrefslogtreecommitdiff
path: root/android
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2023-01-25 10:08:48 +0100
committerMichael Weghorn <m.weghorn@posteo.de>2023-02-16 20:32:34 +0000
commitd07962c0b1395aa5edf21ba2ddbbc0574bf464b7 (patch)
tree450a5e7d712cc31ae33a228e980ea077f224d8d9 /android
parent8c1a3422dbce3236ca310e0541ca9d1ead2fc166 (diff)
android: Use actual Android API level for minSdkVersion, nss
When an Android API level is explicitly set with the `--with-android-api-level` switch introduced in commit 4c0bccbb21ba022fd9d630eb1d9ae34673b4dc11 Date: Thu Jul 4 09:06:49 2019 +0200 android: Allow specification of the API level. , use that for the minSdkVersion for the Android Viewer app and the API level for the NSS build, rather than leaving that hard-coded at API level 16. Building with a newer API level means that the app won't run on devices with older API levels. With this in place, this will be recognized at install time (installation will fail: INSTALL_FAILED_OLDER_SDK) rather than crashing at run time. Change-Id: Id6047b768d265b965696f3a3161d7828e5f3696e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146127 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'android')
-rw-r--r--android/Bootstrap/Makefile.shared1
-rw-r--r--android/source/build.gradle2
2 files changed, 2 insertions, 1 deletions
diff --git a/android/Bootstrap/Makefile.shared b/android/Bootstrap/Makefile.shared
index de7351f5e3f8..aec361ff24c0 100644
--- a/android/Bootstrap/Makefile.shared
+++ b/android/Bootstrap/Makefile.shared
@@ -111,6 +111,7 @@ liboSettings.gradle: $(BUILDDIR)/config_build.mk $(BUILDDIR)/config_host.mk
&& echo "android.defaultConfig {" \
&& echo " applicationId '$(ANDROID_PACKAGE_NAME)'" \
&& echo " archivesBaseName = 'LibreOfficeViewer'" \
+ && echo " minSdkVersion = $(ANDROID_API_LEVEL)" \
&& echo " versionCode project.hasProperty('cmdVersionCode') ? cmdVersionCode.toInteger() : $(if $(versionCode),$(versionCode),1)" \
&& echo " versionName '$(LIBO_VERSION_MAJOR).$(LIBO_VERSION_MINOR).$(LIBO_VERSION_MICRO).$(LIBO_VERSION_PATCH)$(LIBO_VERSION_SUFFIX)$(LIBO_VERSION_SUFFIX_SUFFIX)/$(shell cd $(SRCDIR) && git log -1 --format=%h)/$(OOO_VENDOR)'" \
&& echo "}" \
diff --git a/android/source/build.gradle b/android/source/build.gradle
index 3f97fca4497e..38a7cc801467 100644
--- a/android/source/build.gradle
+++ b/android/source/build.gradle
@@ -48,7 +48,7 @@ android {
strippedUIEditing.assets.srcDirs 'assets_strippedUI'
}
defaultConfig {
- minSdkVersion 16
+ // minSdkVersion is set in liboSettings.gradle
targetSdkVersion 33
// multidex needed when > 65,536 methods referenced with minSdKVersion < 21
// s. https://developer.android.com/studio/build/multidex