Files
odfstudio/android/Makefile
T
Ivan Vladimirovich Kuznetsov 56ef560f84 Android. Rename source module to app
According to documentation
https://developer.android.com/build/android-build-structure
the root module should be named "app".
So the source module was renamed.

Change-Id: I1d8e239ab2df54cc294aa7da0a9746a87952bb3c
2026-07-20 14:49:35 +02:00

36 lines
1.4 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/app/bin/LibreOfficeViewer.apk
RELEASE_APK_USAGE := echo; echo "Usage: make versionCode=<version_num+1> key=<key_name> release-apk"
local.properties: $(BUILDDIR)/config_host.mk
echo sdk.dir=$(ANDROID_SDK_DIR) >local.properties
release-apk: build
# versionCode and key are mandatory
@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/app/build/outputs/apk/LibreOfficeViewer-strippedUI-release-unsigned.apk $(key)
$(ANDROID_SDK_DIR)/build-tools/*/zipalign -v 4 $(BUILDDIR)/android/app/build/outputs/apk/LibreOfficeViewer-strippedUI-release-unsigned.apk $(SIGNED_APK)
@echo
@echo "Resulting signed apk: $(SIGNED_APK)"
# vim: set noet sw=4 ts=4: