summaryrefslogtreecommitdiff
path: root/android/Makefile
blob: 796f8092959b0f872512858ad6b3064f6492f160 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
#
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

module_directory:=$(dir $(realpath $(firstword $(MAKEFILE_LIST))))

include $(module_directory)/../solenv/gbuild/partial_build.mk

.PHONY: sign

SIGNED_APK := $(BUILDDIR)/android/source/bin/LibreOfficeViewer.apk
RELEASE_APK_USAGE := echo; echo "Usage: make versionCode=<version_num+1> exampleDocument=</absolute/path/example.odt> key=<key_name> release-apk"

release-apk: build
	# versionCode and key are mandatory, exampleDocument is not
	@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)

	# the actual signing
	jarsigner --verbose -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore ~/.keystore $(BUILDDIR)/android/source/build/outputs/apk/LibreOfficeViewer-strippedUI-release-unsigned.apk $(key)
	$(ANDROID_SDK_DIR)/build-tools/*/zipalign -v 4 $(BUILDDIR)/android/source/build/outputs/apk/LibreOfficeViewer-strippedUI-release-unsigned.apk $(SIGNED_APK)

	@echo
	@echo "Resulting signed apk: $(SIGNED_APK)"

# vim: set noet sw=4 ts=4:
commit/.git-hooks?id=3fa79c0fa5619911e7a251e2b3a837fdaa426f48'>disallow .ui translatable entries without context at checkinCaolán McNamara 2017-03-24git pre-commit hook: Also check swift filesSamuel Mehrbrodt 2016-12-08tdf#102784 - Enhance git pre-commit hookMarina Latini =dc1858783e72bba808dbd87b5b03d5170449ad52'>tdf#120703 (PVS): V519 The variable is assigned values twice successivelyMike Kaganski 2018-10-24remove more rtl::OUString and OString prefixesNoel Grandin 2018-10-19expression is excessiveCaolán McNamara 2018-10-13loplugin:constfields in package..registryNoel Grandin 2018-10-09Extend loplugin:redundantinline to catch inline functions w/o external linkageStephan Bergmann