am bb219fc3
: Add LOCAL_JARJAR_RULES support for BUILD_HOST_JAVA_LIBRARY
* commit 'bb219fc3dc29e832f3cd8e435c94a894ef2ee87f': Add LOCAL_JARJAR_RULES support for BUILD_HOST_JAVA_LIBRARY
This commit is contained in:
commit
56c35da7fb
1 changed files with 22 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue