mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-01 08:42:13 +00:00
c8ee8a09cf
This commit is us getting out of our own way. We were specifying -classpath twice, once in $(JAVAC) and once in java-build.mk. Only the latter of these is active. This a problem for ANDROID_EXTRA_JARS -- those JARs should be on the classpath and input to $(DX) -- and JARs that should be on the classpath but *not* input to $(DX). This commit removes the global flags to $(JAVAC) and adds JAVA_{BOOT}CLASSPATH_JARS. This required some hijinkery moving wildcards to moz.build files, but everything seems to work. As well as clarifying some parts of the build, part 2 uses this work to modify the classpath. --HG-- extra : commitid : 25Ft0BFs88O extra : rebase_source : 05e3d1da8d42fa89d06ef48baee17bb77df5bd59 extra : histedit_source : 95b82309aca15c5a3c5f5a0eafbdcf75c5e8dfc0
45 lines
1.4 KiB
Makefile
45 lines
1.4 KiB
Makefile
# 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/.
|
|
|
|
# Ensure ANDROID_SDK is defined before including this file.
|
|
# We use common android defaults for boot class path and java version.
|
|
ifndef ANDROID_SDK
|
|
$(error ANDROID_SDK must be defined before including android-common.mk)
|
|
endif
|
|
|
|
# DEBUG_JARSIGNER always debug signs.
|
|
DEBUG_JARSIGNER=$(PYTHON) $(abspath $(topsrcdir)/mobile/android/debug_sign_tool.py) \
|
|
--keytool=$(KEYTOOL) \
|
|
--jarsigner=$(JARSIGNER) \
|
|
$(NULL)
|
|
|
|
# RELEASE_JARSIGNER release signs if possible.
|
|
ifdef MOZ_SIGN_CMD
|
|
RELEASE_JARSIGNER := $(MOZ_SIGN_CMD) -f jar
|
|
else
|
|
RELEASE_JARSIGNER := $(DEBUG_JARSIGNER)
|
|
endif
|
|
|
|
# $(1) is the full path to input: foo-debug-unsigned-unaligned.apk.
|
|
# $(2) is the full path to output: foo.apk.
|
|
# Use this like: $(call RELEASE_SIGN_ANDROID_APK,foo-debug-unsigned-unaligned.apk,foo.apk)
|
|
RELEASE_SIGN_ANDROID_APK = \
|
|
cp $(1) $(2)-unaligned.apk && \
|
|
$(RELEASE_JARSIGNER) $(2)-unaligned.apk && \
|
|
$(ZIPALIGN) -f -v 4 $(2)-unaligned.apk $(2) && \
|
|
$(RM) $(2)-unaligned.apk
|
|
|
|
# For Android, we default to 1.7
|
|
ifndef JAVA_VERSION
|
|
JAVA_VERSION = 1.7
|
|
endif
|
|
|
|
JAVAC_FLAGS = \
|
|
-target $(JAVA_VERSION) \
|
|
-source $(JAVA_VERSION) \
|
|
-encoding UTF8 \
|
|
-g:source,lines \
|
|
-Werror \
|
|
$(NULL)
|