ee8257a1c7
move preparation tasks (creating assets/processing files) from the makefile into the gradle script This allows much easier integration into android-studio (just open android/source with android studio after running make to compile the native library) Change-Id: I9a9d6832797c24a7e195a1c7954cd6d20f5a8496
32 lines
1.3 KiB
Makefile
32 lines
1.3 KiB
Makefile
# -*- 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, examplDocument 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_HOME)/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:
|