summaryrefslogtreecommitdiff
path: root/android
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2015-01-22 08:35:40 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-01-26 10:27:43 +0100
commitae924ed3d0a3a9b4f8438c4f1187d8378777bf92 (patch)
tree060ade2c414c020839cd6ac196fd38980aa81aef /android
parent2d584cb7cc5c5b14d3e158690fb30cd2866ab7c5 (diff)
android: Rename 'make sign' to 'make release-apk'.
This now also allows to specify the version number; now you want to use: cd android/ make versionCode=<previous_version_num+1> key=<key_name> release-apk Change-Id: I078e8dbbe671969fc3b228ac987cdb9a4a53b281
Diffstat (limited to 'android')
-rw-r--r--android/Bootstrap/Makefile.shared6
-rw-r--r--android/Makefile5
-rw-r--r--android/experimental/LOAndroid3/AndroidManifest.xml.in6
3 files changed, 12 insertions, 5 deletions
diff --git a/android/Bootstrap/Makefile.shared b/android/Bootstrap/Makefile.shared
index fd48132a4c4e..64efa932ba66 100644
--- a/android/Bootstrap/Makefile.shared
+++ b/android/Bootstrap/Makefile.shared
@@ -182,7 +182,11 @@ copy-stuff:
echo 'BuildVersion=' >> assets/program/versionrc
echo 'buildid=$(shell cd $(SRCDIR) && git log -1 --format=%H)' >> assets/program/versionrc
echo 'ReferenceOOoMajorMinor=4.1' >> assets/program/versionrc
- sed -i 's|android:versionName=".*"|android: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)"|' AndroidManifest.xml
+ sed -e 's|@ANDROID_DEBUGGABLE@|$(if $(ENABLE_DEBUG),android:debuggable="true",)|' \
+ -e 's|@ANDROID_INSTALL_LOCATION@|$(if $(ENABLE_DEBUG),internalOnly,preferExternal)|' \
+ -e 's|@ANDROID_VERSION_NAME@|$(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)|' \
+ -e 's|@ANDROID_VERSION_NUMBER@|$(if $(versionCode),$(versionCode),1)|' \
+ < AndroidManifest.xml.in > AndroidManifest.xml
#
# .res files
mkdir -p assets/program/resource
diff --git a/android/Makefile b/android/Makefile
index 8a2bdbd5475a..644d0e6e1638 100644
--- a/android/Makefile
+++ b/android/Makefile
@@ -13,8 +13,11 @@ include $(module_directory)/../solenv/gbuild/partial_build.mk
.PHONY: sign
SIGNED_APK := $(BUILDDIR)/android/experimental/LOAndroid3/bin/LibreOfficeViewer.apk
+RELEASE_APK_USAGE := echo; echo "Usage: make versionCode=<version_num+1> key=<key_name> release-apk"
-sign: build
+release-apk: build
+ @if test -z "$(versionCode)" ; then $(RELEASE_APK_USAGE) ; exit 1 ; fi
+ @if test -z "$(key)" ; then $(RELEASE_APK_USAGE) ; exit 1 ; fi
rm -f $(SIGNED_APK)
jarsigner --verbose -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore ~/.keystore $(BUILDDIR)/android/experimental/LOAndroid3/bin/LibreOfficeViewer-release-unsigned.apk $(key)
$(ANDROID_SDK_HOME)/build-tools/*/zipalign -v 4 $(BUILDDIR)/android/experimental/LOAndroid3/bin/LibreOfficeViewer-release-unsigned.apk $(SIGNED_APK)
diff --git a/android/experimental/LOAndroid3/AndroidManifest.xml.in b/android/experimental/LOAndroid3/AndroidManifest.xml.in
index ac2c8af2a530..3a17f6297e07 100644
--- a/android/experimental/LOAndroid3/AndroidManifest.xml.in
+++ b/android/experimental/LOAndroid3/AndroidManifest.xml.in
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.libreoffice"
- @ANDROID_INSTALL_LOCATION@
- android:versionCode="1"
- android:versionName="@ANDROID_VERSION@">
+ android:installLocation="@ANDROID_INSTALL_LOCATION@"
+ android:versionCode="@ANDROID_VERSION_NUMBER@"
+ android:versionName="@ANDROID_VERSION_NAME@">
<!-- App requires OpenGL ES 2.0 -->
<uses-feature android:glEsVersion="0x00020000" android:required="true" />