Add LOCAL_JARJAR_RULES support for BUILD_HOST_JAVA_LIBRARY

Bug: 3086427
Change-Id: Ibe73dfa70d4c3d82968c43e74ced38cd74f60e0f
This commit is contained in:
Brian Carlstrom 2011-01-26 15:09:47 -08:00
parent 55d932840f
commit bb219fc3dc

View file

@ -27,10 +27,14 @@ ifeq ($(LOCAL_BUILD_HOST_DEX),true)
intermediates := $(call local-intermediates-dir)
intermediates.COMMON := $(call local-intermediates-dir,COMMON)
full_classes_compiled_jar := $(intermediates.COMMON)/classes-full-debug.jar
full_classes_jarjar_jar := $(intermediates.COMMON)/classes-jarjar.jar
full_classes_jar := $(intermediates.COMMON)/classes.jar
built_dex := $(intermediates.COMMON)/classes.dex
LOCAL_INTERMEDIATE_TARGETS += \
$(full_classes_compiled_jar) \
$(full_classes_jarjar_jar) \
$(full_classes_jar) \
$(built_dex)
@ -47,10 +51,26 @@ $(LOCAL_INTERMEDIATE_TARGETS): \
$(cleantarget): PRIVATE_CLEAN_FILES += $(intermediates.COMMON)
$(full_classes_jar): PRIVATE_JAVACFLAGS := $(LOCAL_JAVACFLAGS)
$(full_classes_jar): $(java_sources) $(java_resource_sources) $(full_java_lib_deps) $(jar_manifest_file)
$(full_classes_compiled_jar): PRIVATE_JAVACFLAGS := $(LOCAL_JAVACFLAGS)
$(full_classes_compiled_jar): $(java_sources) $(java_resource_sources) $(full_java_lib_deps) $(jar_manifest_file)
$(transform-host-java-to-package)
# Run jarjar if necessary, otherwise just copy the file.
ifneq ($(strip $(LOCAL_JARJAR_RULES)),)
$(full_classes_jarjar_jar): PRIVATE_JARJAR_RULES := $(LOCAL_JARJAR_RULES)
$(full_classes_jarjar_jar): $(full_classes_compiled_jar) | $(JARJAR)
@echo JarJar: $@
$(hide) java -jar $(JARJAR) process $(PRIVATE_JARJAR_RULES) $< $@
else
$(full_classes_jarjar_jar): $(full_classes_compiled_jar) | $(ACP)
@echo Copying: $@
$(hide) $(ACP) -fp $< $@
endif
$(full_classes_jar): $(full_classes_jarjar_jar) | $(ACP)
@echo Copying: $@
$(hide) $(ACP) -fp $< $@
$(built_dex): PRIVATE_INTERMEDIATES_DIR := $(intermediates.COMMON)
$(built_dex): PRIVATE_DX_FLAGS := $(LOCAL_DX_FLAGS)
$(built_dex): $(full_classes_jar) $(DX)