forked from openkylin/platform_build
Merge changes I06179fca,Ie48746c8,Ia47ebc95 am: b182ea7bcb
am: 2c717745b2
am: 1e7f83bf49
Change-Id: I538de57657bfc334dc6d3d24b22baccb01d9b0d5
This commit is contained in:
commit
ec346cf1fd
|
@ -22,6 +22,12 @@ ifndef ANDROID_COMPILE_WITH_JACK
|
|||
endif
|
||||
endif
|
||||
|
||||
ifdef TARGET_BUILD_APPS
|
||||
ifndef TURBINE_ENABLED
|
||||
TURBINE_ENABLED := false
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(OVERRIDE_ANDROID_JAVA_HOME),)
|
||||
ANDROID_JAVA_HOME := prebuilts/jdk/jdk8/$(HOST_PREBUILT_TAG)
|
||||
else
|
||||
|
|
|
@ -671,34 +671,27 @@ endef
|
|||
## $(2): Non-empty if IS_HOST_MODULE
|
||||
###########################################################
|
||||
|
||||
# $(1): library name
|
||||
# $(2): Non-empty if IS_HOST_MODULE
|
||||
define _java-lib-dir
|
||||
$(call intermediates-dir-for, \
|
||||
JAVA_LIBRARIES,$(1),$(2),COMMON)
|
||||
endef
|
||||
|
||||
# $(1): library name
|
||||
# $(2): Non-empty if IS_HOST_MODULE
|
||||
define _java-lib-full-classes.jar
|
||||
$(call _java-lib-dir,$(1),$(2))/classes.jar
|
||||
endef
|
||||
|
||||
# Get the jar files (you can pass to "javac -classpath") of static or shared
|
||||
# Java libraries that you want to link against.
|
||||
# $(1): library name list
|
||||
# $(2): Non-empty if IS_HOST_MODULE
|
||||
define java-lib-files
|
||||
$(foreach lib,$(1),$(call _java-lib-full-classes.jar,$(lib),$(2)))
|
||||
$(foreach lib,$(1),$(call intermediates-dir-for,JAVA_LIBRARIES,$(lib),$(2),COMMON)/classes.jar)
|
||||
endef
|
||||
|
||||
# Get the header jar files (you can pass to "javac -classpath") of static or shared
|
||||
# Java libraries that you want to link against.
|
||||
# $(1): library name list
|
||||
# $(2): Non-empty if IS_HOST_MODULE
|
||||
ifneq ($(TURBINE_ENABLED),false)
|
||||
define java-lib-header-files
|
||||
$(foreach lib,$(1),$(call intermediates-dir-for, JAVA_LIBRARIES,$(lib),$(2),COMMON)/classes-header.jar)
|
||||
$(foreach lib,$(1),$(call intermediates-dir-for,JAVA_LIBRARIES,$(lib),$(2),COMMON)/classes-header.jar)
|
||||
endef
|
||||
else
|
||||
define java-lib-header-files
|
||||
$(call java-lib-files,$(1),$(2))
|
||||
endef
|
||||
endif
|
||||
|
||||
# Get the dependency files (you can put on the right side of "|" of a build rule)
|
||||
# of the Java libraries.
|
||||
|
@ -712,6 +705,25 @@ define java-lib-deps
|
|||
$(call java-lib-files,$(1),$(2))
|
||||
endef
|
||||
|
||||
# Get the jar files (you can pass to "javac -classpath") of static or shared
|
||||
# APK libraries that you want to link against.
|
||||
# $(1): library name list
|
||||
define app-lib-files
|
||||
$(foreach lib,$(1),$(call intermediates-dir-for,APPS,$(lib),,COMMON)/classes.jar)
|
||||
endef
|
||||
|
||||
# Get the header jar files (you can pass to "javac -classpath") of static or shared
|
||||
# APK libraries that you want to link against.
|
||||
# $(1): library name list
|
||||
ifneq ($(TURBINE_ENABLED),false)
|
||||
define app-lib-header-files
|
||||
$(foreach lib,$(1),$(call intermediates-dir-for,APPS,$(lib),,COMMON)/classes-header.jar)
|
||||
endef
|
||||
else
|
||||
define app-lib-header-files
|
||||
$(call app-lib-files,$(1))
|
||||
endef
|
||||
endif
|
||||
|
||||
###########################################################
|
||||
## Convert "core ext framework" to "out/.../classes.jack ..."
|
||||
|
@ -719,16 +731,10 @@ endef
|
|||
## $(2): Non-empty if IS_HOST_MODULE
|
||||
###########################################################
|
||||
|
||||
# $(1): library name
|
||||
# $(2): Non-empty if IS_HOST_MODULE
|
||||
define _jack-lib-full-classes
|
||||
$(call _java-lib-dir,$(1),$(2))/classes.jack
|
||||
endef
|
||||
|
||||
# $(1): library name list
|
||||
# $(2): Non-empty if IS_HOST_MODULE
|
||||
define jack-lib-files
|
||||
$(foreach lib,$(1),$(call _jack-lib-full-classes,$(lib),$(2)))
|
||||
$(foreach lib,$(1),$(call intermediates-dir-for,JAVA_LIBRARIES,$(lib),$(2),COMMON)/classes.jack)
|
||||
endef
|
||||
|
||||
###########################################################
|
||||
|
|
|
@ -119,6 +119,8 @@ $(full_classes_compiled_jar): \
|
|||
| $(SOONG_JAVAC_WRAPPER)
|
||||
$(transform-host-java-to-dalvik-package)
|
||||
|
||||
ifneq ($(TURBINE_ENABLED),false)
|
||||
|
||||
$(full_classes_turbine_jar): PRIVATE_JAVACFLAGS := $(LOCAL_JAVACFLAGS) $(annotation_processor_flags)
|
||||
$(full_classes_turbine_jar): PRIVATE_DONT_DELETE_JAR_META_INF := $(LOCAL_DONT_DELETE_JAR_META_INF)
|
||||
$(full_classes_turbine_jar): \
|
||||
|
@ -147,6 +149,8 @@ endif
|
|||
|
||||
$(eval $(call copy-one-file,$(full_classes_header_jarjar),$(full_classes_header_jar)))
|
||||
|
||||
endif # TURBINE_ENABLED != false
|
||||
|
||||
$(full_classes_combined_jar): PRIVATE_DONT_DELETE_JAR_META_INF := $(LOCAL_DONT_DELETE_JAR_META_INF)
|
||||
$(full_classes_combined_jar): $(full_classes_compiled_jar) \
|
||||
$(jar_manifest_file) \
|
||||
|
|
|
@ -122,4 +122,6 @@ include $(BUILD_SYSTEM)/jacoco.mk
|
|||
$(eval $(call copy-one-file,$(LOCAL_FULL_CLASSES_JACOCO_JAR),$(LOCAL_BUILT_MODULE)))
|
||||
$(eval $(call copy-one-file,$(LOCAL_FULL_CLASSES_JACOCO_JAR),$(full_classes_jar)))
|
||||
|
||||
ifneq ($(TURBINE_DISABLED),false)
|
||||
$(eval $(call copy-one-file,$(LOCAL_FULL_CLASSES_JACOCO_JAR),$(full_classes_header_jar)))
|
||||
endif
|
||||
|
|
|
@ -512,6 +512,8 @@ $(full_classes_compiled_jar): \
|
|||
| $(SOONG_JAVAC_WRAPPER)
|
||||
$(transform-java-to-classes.jar)
|
||||
|
||||
ifneq ($(TURBINE_ENABLED),false)
|
||||
|
||||
$(full_classes_turbine_jar): PRIVATE_JAVACFLAGS := $(LOCAL_JAVACFLAGS) $(annotation_processor_flags)
|
||||
$(full_classes_turbine_jar): PRIVATE_DONT_DELETE_JAR_META_INF := $(LOCAL_DONT_DELETE_JAR_META_INF)
|
||||
$(full_classes_turbine_jar): \
|
||||
|
@ -540,6 +542,8 @@ endif
|
|||
|
||||
$(eval $(call copy-one-file,$(full_classes_header_jarjar),$(full_classes_header_jar)))
|
||||
|
||||
endif # TURBINE_ENABLED != false
|
||||
|
||||
javac-check : $(full_classes_compiled_jar)
|
||||
javac-check-$(LOCAL_MODULE) : $(full_classes_compiled_jar)
|
||||
|
||||
|
|
|
@ -174,15 +174,8 @@ ifdef LOCAL_ANNOTATION_PROCESSORS
|
|||
annotation_processor_jars :=
|
||||
endif
|
||||
|
||||
full_static_java_libs := \
|
||||
$(foreach lib,$(LOCAL_STATIC_JAVA_LIBRARIES), \
|
||||
$(call intermediates-dir-for, \
|
||||
JAVA_LIBRARIES,$(lib),$(LOCAL_IS_HOST_MODULE),COMMON)/classes.jar)
|
||||
|
||||
full_static_java_header_libs := \
|
||||
$(foreach lib,$(LOCAL_STATIC_JAVA_LIBRARIES), \
|
||||
$(call intermediates-dir-for, \
|
||||
JAVA_LIBRARIES,$(lib),$(LOCAL_IS_HOST_MODULE),COMMON)/classes-header.jar)
|
||||
full_static_java_libs := $(call java-lib-files,$(LOCAL_STATIC_JAVA_LIBRARIES),$(LOCAL_IS_HOST_MODULE))
|
||||
full_static_java_header_libs := $(call java-lib-header-files,$(LOCAL_STATIC_JAVA_LIBRARIES),$(LOCAL_IS_HOST_MODULE))
|
||||
|
||||
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_STATIC_JAVA_LIBRARIES := $(full_static_java_libs)
|
||||
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_STATIC_JAVA_HEADER_LIBRARIES := $(full_static_java_header_libs)
|
||||
|
@ -283,14 +276,8 @@ ifndef LOCAL_IS_HOST_MODULE
|
|||
# shared libraries, allowing them to make use of the code in the linked apk.
|
||||
apk_libraries := $(sort $(LOCAL_APK_LIBRARIES) $(LOCAL_RES_LIBRARIES))
|
||||
ifneq ($(apk_libraries),)
|
||||
link_apk_libraries := \
|
||||
$(foreach lib,$(apk_libraries), \
|
||||
$(call intermediates-dir-for, \
|
||||
APPS,$(lib),,COMMON)/classes-pre-proguard.jar)
|
||||
link_apk_header_libs := \
|
||||
$(foreach lib,$(apk_libraries), \
|
||||
$(call intermediates-dir-for, \
|
||||
APPS,$(lib),,COMMON)/classes-header.jar)
|
||||
link_apk_libraries := $(call app-lib-files,$(apk_libraries))
|
||||
link_apk_header_libs := $(call app-lib-header-files,$(apk_libraries))
|
||||
|
||||
# link against the jar with full original names (before proguard processing).
|
||||
full_shared_java_libs += $(link_apk_libraries)
|
||||
|
@ -312,7 +299,11 @@ ifdef LOCAL_INSTRUMENTATION_FOR
|
|||
APPS,$(LOCAL_INSTRUMENTATION_FOR),,COMMON)
|
||||
# link against the jar with full original names (before proguard processing).
|
||||
link_instr_classes_jar := $(link_instr_intermediates_dir.COMMON)/classes-pre-proguard.jar
|
||||
link_instr_classes_header_jar := $(link_instr_intermediates_dir.COMMON)/classes-header.jar
|
||||
ifneq ($(TURBINE_ENABLED),false)
|
||||
link_instr_classes_header_jar := $(link_instr_intermediates_dir.COMMON)/classes-header.jar
|
||||
else
|
||||
link_instr_classes_header_jar := $(link_instr_intermediates_dir.COMMON)/classes.jar
|
||||
endif
|
||||
full_java_libs += $(link_instr_classes_jar)
|
||||
full_java_header_libs += $(link_instr_classes_header_jar)
|
||||
endif # LOCAL_INSTRUMENTATION_FOR
|
||||
|
|
|
@ -513,8 +513,10 @@ $(common_classes_jar): PRIVATE_PREFIX := $(my_prefix)
|
|||
$(common_classes_jar) : $(my_src_jar)
|
||||
$(transform-prebuilt-to-target)
|
||||
|
||||
ifneq ($(TURBINE_ENABLED),false)
|
||||
$(common_header_jar) : $(my_src_jar)
|
||||
$(transform-prebuilt-to-target)
|
||||
endif
|
||||
|
||||
else # !LOCAL_IS_HOST_MODULE
|
||||
# for target java libraries, the LOCAL_BUILT_MODULE is in a product-specific dir,
|
||||
|
@ -565,8 +567,10 @@ endif
|
|||
$(common_classes_jar) : $(my_src_jar)
|
||||
$(transform-prebuilt-to-target)
|
||||
|
||||
ifneq ($(TURBINE_ENABLED),false)
|
||||
$(common_header_jar) : $(my_src_jar)
|
||||
$(transform-prebuilt-to-target)
|
||||
endif
|
||||
|
||||
$(common_classes_pre_proguard_jar) : $(my_src_jar)
|
||||
$(transform-prebuilt-to-target)
|
||||
|
|
|
@ -26,11 +26,13 @@ include $(BUILD_SYSTEM)/jacoco.mk
|
|||
|
||||
$(eval $(call copy-one-file,$(LOCAL_FULL_CLASSES_JACOCO_JAR),$(full_classes_jar)))
|
||||
|
||||
ifneq ($(TURBINE_DISABLED),false)
|
||||
ifdef LOCAL_SOONG_HEADER_JAR
|
||||
$(eval $(call copy-one-file,$(LOCAL_SOONG_HEADER_JAR),$(full_classes_header_jar)))
|
||||
else
|
||||
$(eval $(call copy-one-file,$(full_classes_jar),$(full_classes_header_jar)))
|
||||
endif
|
||||
endif # TURBINE_DISABLED != false
|
||||
|
||||
ifdef LOCAL_SOONG_DEX_JAR
|
||||
$(eval $(call copy-one-file,$(LOCAL_SOONG_DEX_JAR),$(common_javalib.jar)))
|
||||
|
|
Loading…
Reference in New Issue