1 # This Source Code Form is subject to the terms of the Mozilla Public
2 # License, v. 2.0. If a copy of the MPL was not distributed with this
3 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 # Ensure ANDROID_SDK is defined before including this file.
6 # We use common android defaults for boot class path and java version.
8 $(error ANDROID_SDK must be defined before including android-common.mk
)
11 # DEBUG_JARSIGNER always debug signs.
12 DEBUG_JARSIGNER
=$(PYTHON
) $(abspath
$(topsrcdir
)/mobile
/android
/debug_sign_tool.py
) \
13 --keytool
=$(KEYTOOL
) \
14 --jarsigner
=$(JARSIGNER
) \
17 # RELEASE_JARSIGNER release signs if possible.
19 RELEASE_JARSIGNER
:= $(MOZ_SIGN_CMD
) -f jar
21 RELEASE_JARSIGNER
:= $(DEBUG_JARSIGNER
)
24 # $(1) is the full path to input: foo-debug-unsigned-unaligned.apk.
25 # $(2) is the full path to output: foo.apk.
26 # Use this like: $(call RELEASE_SIGN_ANDROID_APK,foo-debug-unsigned-unaligned.apk,foo.apk)
27 RELEASE_SIGN_ANDROID_APK
= \
28 cp
$(1) $(2)-unaligned.apk
&& \
29 $(RELEASE_JARSIGNER
) $(2)-unaligned.apk
&& \
30 $(ZIPALIGN
) -f
-v
4 $(2)-unaligned.apk
$(2) && \
31 $(RM
) $(2)-unaligned.apk
33 # For Android, this defaults to $(ANDROID_SDK)/android.jar
34 ifndef JAVA_BOOTCLASSPATH
35 JAVA_BOOTCLASSPATH
= $(ANDROID_SDK
)/android.jar
38 # For Android, we default to 1.7
44 -target
$(JAVA_VERSION
) \
45 -source
$(JAVA_VERSION
) \
46 $(if
$(JAVA_CLASSPATH
),-classpath
$(JAVA_CLASSPATH
),) \
47 -bootclasspath
$(JAVA_BOOTCLASSPATH
) \