am 67107450: am d4b1d52b: support protos in host java libraries
* commit '67107450fa0df245c6d1328c17a2af070aa537df': support protos in host java libraries
This commit is contained in:
commit
3872ead7e6
|
@ -26,14 +26,29 @@ LOCAL_BUILT_MODULE_STEM := javalib.jar
|
|||
# base_rules.mk looks at this
|
||||
all_res_assets :=
|
||||
|
||||
ifeq ($(LOCAL_BUILD_HOST_DEX),true)
|
||||
ifneq ($(LOCAL_NO_STANDARD_LIBRARIES),true)
|
||||
LOCAL_JAVA_LIBRARIES := $(sort core-hostdex $(LOCAL_JAVA_LIBRARIES))
|
||||
proto_sources := $(filter %.proto,$(LOCAL_SRC_FILES))
|
||||
ifneq ($(proto_sources),)
|
||||
ifeq ($(LOCAL_PROTOC_OPTIMIZE_TYPE),micro)
|
||||
LOCAL_JAVA_LIBRARIES += host-libprotobuf-java-2.3.0-micro
|
||||
else
|
||||
ifeq ($(LOCAL_PROTOC_OPTIMIZE_TYPE),nano)
|
||||
LOCAL_JAVA_LIBRARIES += host-libprotobuf-java-2.3.0-nano
|
||||
else
|
||||
LOCAL_JAVA_LIBRARIES += host-libprotobuf-java-2.3.0-lite
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
intermediates := $(call local-intermediates-dir)
|
||||
intermediates.COMMON := $(call local-intermediates-dir,COMMON)
|
||||
|
||||
LOCAL_INTERMEDIATE_SOURCE_DIR := $(intermediates.COMMON)/src
|
||||
|
||||
ifeq ($(LOCAL_BUILD_HOST_DEX),true)
|
||||
ifneq ($(LOCAL_NO_STANDARD_LIBRARIES),true)
|
||||
LOCAL_JAVA_LIBRARIES += core-hostdex
|
||||
endif
|
||||
|
||||
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
|
||||
|
@ -45,13 +60,15 @@ LOCAL_INTERMEDIATE_TARGETS += \
|
|||
$(full_classes_jar) \
|
||||
$(built_dex)
|
||||
|
||||
LOCAL_INTERMEDIATE_SOURCE_DIR := $(intermediates.COMMON)/src
|
||||
# See comment in java.mk
|
||||
java_alternative_checked_module := $(full_classes_compiled_jar)
|
||||
|
||||
endif # LOCAL_BUILD_HOST_DEX
|
||||
|
||||
LOCAL_JAVA_LIBRARIES := $(sort $(LOCAL_JAVA_LIBRARIES))
|
||||
|
||||
#######################################
|
||||
include $(BUILD_SYSTEM)/base_rules.mk
|
||||
#######################################
|
||||
|
||||
$(full_classes_compiled_jar): PRIVATE_JAVAC_DEBUG_FLAGS := -g
|
||||
|
||||
|
@ -75,7 +92,7 @@ $(full_classes_compiled_jar): PRIVATE_JAR_EXCLUDE_FILES :=
|
|||
$(full_classes_compiled_jar): PRIVATE_JAR_PACKAGES :=
|
||||
$(full_classes_compiled_jar): PRIVATE_RMTYPEDEFS :=
|
||||
$(full_classes_compiled_jar): $(java_sources) $(java_resource_sources) $(full_java_lib_deps) \
|
||||
$(jar_manifest_file) $(LOCAL_ADDITIONAL_DEPENDENCIES)
|
||||
$(jar_manifest_file) $(proto_java_sources_file_stamp) $(LOCAL_ADDITIONAL_DEPENDENCIES)
|
||||
$(transform-host-java-to-package)
|
||||
|
||||
# Run jarjar if necessary, otherwise just copy the file.
|
||||
|
@ -116,6 +133,6 @@ $(LOCAL_BUILT_MODULE): PRIVATE_JAR_EXCLUDE_FILES :=
|
|||
$(LOCAL_BUILT_MODULE): PRIVATE_JAR_PACKAGES :=
|
||||
$(LOCAL_BUILT_MODULE): PRIVATE_RMTYPEDEFS :=
|
||||
$(LOCAL_BUILT_MODULE): $(java_sources) $(java_resource_sources) $(full_java_lib_deps) \
|
||||
$(jar_manifest_file) $(LOCAL_ADDITIONAL_DEPENDENCIES)
|
||||
$(jar_manifest_file) $(proto_java_sources_file_stamp) $(LOCAL_ADDITIONAL_DEPENDENCIES)
|
||||
$(transform-host-java-to-package)
|
||||
endif # LOCAL_BUILD_HOST_DEX
|
||||
|
|
Loading…
Reference in New Issue