Merge "Revert "Add Turbine as part of java build toolchain in Make."" am: 91ffbf2fbe
am: 2c82a22d96
am: 40403cdded
am: 3b202bde3f
Change-Id: I813ede2293eb8e98ce52be9c810e6d9aacb634b2
This commit is contained in:
commit
30c3cd8936
9 changed files with 51 additions and 167 deletions
|
@ -651,7 +651,6 @@ JACK_DEFAULT_ARGS := $(BUILD_SYSTEM)/jack-default.args
|
|||
DEFAULT_JACK_EXTRA_ARGS := @$(JACK_DEFAULT_ARGS)
|
||||
endif
|
||||
|
||||
TURBINE := $(HOST_OUT_JAVA_LIBRARIES)/turbine$(COMMON_JAVA_PACKAGE_SUFFIX)
|
||||
PROGUARD := external/proguard/bin/proguard.sh
|
||||
JAVATAGS := build/tools/java-event-log-tags.py
|
||||
MERGETAGS := build/tools/merge-event-log-tags.py
|
||||
|
|
|
@ -692,14 +692,6 @@ define java-lib-files
|
|||
$(foreach lib,$(1),$(call _java-lib-full-classes.jar,$(lib),$(2)))
|
||||
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
|
||||
define java-lib-header-files
|
||||
$(foreach lib,$(1),$(call intermediates-dir-for, JAVA_LIBRARIES,$(lib),$(2),COMMON)/classes-header.jar)
|
||||
endef
|
||||
|
||||
# Get the dependency files (you can put on the right side of "|" of a build rule)
|
||||
# of the Java libraries.
|
||||
# $(1): library name list
|
||||
|
@ -2237,7 +2229,6 @@ endef
|
|||
#
|
||||
# $(1): javac
|
||||
# $(2): bootclasspath
|
||||
# $(3): classpath_libs
|
||||
define compile-java
|
||||
$(hide) rm -f $@
|
||||
$(hide) rm -rf $(PRIVATE_CLASS_INTERMEDIATES_DIR) $(PRIVATE_ANNO_INTERMEDIATES_DIR)
|
||||
|
@ -2249,7 +2240,7 @@ $(hide) if [ -s $(PRIVATE_JAVA_SOURCE_LIST) ] ; then \
|
|||
$(if $(findstring true,$(PRIVATE_WARNINGS_ENABLE)),$(xlint_unchecked),) \
|
||||
$(2) \
|
||||
$(addprefix -classpath ,$(strip \
|
||||
$(call normalize-path-list,$(3)))) \
|
||||
$(call normalize-path-list,$(PRIVATE_ALL_JAVA_LIBRARIES)))) \
|
||||
$(if $(findstring true,$(PRIVATE_WARNINGS_ENABLE)),$(xlint_unchecked),) \
|
||||
-d $(PRIVATE_CLASS_INTERMEDIATES_DIR) -s $(PRIVATE_ANNO_INTERMEDIATES_DIR) \
|
||||
$(PRIVATE_JAVACFLAGS) \
|
||||
|
@ -2281,31 +2272,7 @@ endef
|
|||
|
||||
define transform-java-to-classes.jar
|
||||
@echo "$($(PRIVATE_PREFIX)DISPLAY) Java: $(PRIVATE_MODULE) ($(PRIVATE_CLASS_INTERMEDIATES_DIR))"
|
||||
$(call compile-java,$(TARGET_JAVAC),$(PRIVATE_BOOTCLASSPATH),$(PRIVATE_ALL_JAVA_HEADER_LIBRARIES))
|
||||
endef
|
||||
|
||||
define transform-java-to-header.jar
|
||||
@echo "$($(PRIVATE_PREFIX)DISPLAY) Turbine: $(PRIVATE_MODULE)"
|
||||
@mkdir -p $(dir $@)
|
||||
@rm -rf $(dir $@)/classes-turbine
|
||||
@mkdir $(dir $@)/classes-turbine
|
||||
$(hide) if [ -s $(PRIVATE_JAVA_SOURCE_LIST) ] ; then \
|
||||
$(JAVA) -jar $(TURBINE) \
|
||||
--output $@.tmp --temp_dir $(dir $@)/classes-turbine -$(PRIVATE_BOOTCLASSPATH) \
|
||||
--sources \@$(PRIVATE_JAVA_SOURCE_LIST) \
|
||||
--javacopts $(PRIVATE_JAVACFLAGS) $(COMMON_JDK_FLAGS) \
|
||||
$(addprefix --classpath ,$(strip \
|
||||
$(call normalize-path-list,$(PRIVATE_ALL_JAVA_HEADER_LIBRARIES)))) \
|
||||
|| ( rm -rf $(dir $@)/classes-turbine ; exit 41 ) \
|
||||
fi
|
||||
$(hide) $(call unzip-jar-files,$(PRIVATE_STATIC_JAVA_HEADER_LIBRARIES),$(dir $@)/classes-turbine)
|
||||
$(hide) if [ -s $@.tmp ] ; then \
|
||||
unzip -qo $@.tmp -d $(dir $@)/classes-turbine; rm -f $(dir $@)/classes-turbine/module-info.class; \
|
||||
fi
|
||||
$(hide) $(if $(PRIVATE_DONT_DELETE_JAR_META_INF),,$(hide) rm -rf $(dir $@)/classes-turbine/META-INF)
|
||||
$(hide) $(JAR) -cf $@.tmp $(call jar-args-sorted-files-in-directory,$(dir $@)/classes-turbine)
|
||||
$(hide) $(ZIPTIME) $@.tmp
|
||||
$(hide) $(call commit-change-for-toc,$@)
|
||||
$(call compile-java,$(TARGET_JAVAC),$(PRIVATE_BOOTCLASSPATH))
|
||||
endef
|
||||
|
||||
# Invoke Jack to compile java from source to dex and jack files.
|
||||
|
@ -2420,6 +2387,26 @@ else \
|
|||
fi
|
||||
endef
|
||||
|
||||
# b/37756495
|
||||
IJAR_ASAN_OPTIONS := ASAN_OPTIONS=detect_leaks=0
|
||||
|
||||
## Rule to create a table of contents from a .jar file.
|
||||
## Must be called with $(eval).
|
||||
# $(1): A .jar file
|
||||
define _transform-jar-to-toc
|
||||
$1.toc: $1 | $(IJAR)
|
||||
@echo Generating TOC: $$@
|
||||
$(hide) $(IJAR_ASAN_OPTIONS) $(IJAR) $$< $$@.tmp
|
||||
$$(call commit-change-for-toc,$$@)
|
||||
endef
|
||||
|
||||
## Define a rule which generates .jar.toc and mark it as .KATI_RESTAT.
|
||||
# $(1): A .jar file
|
||||
define define-jar-to-toc-rule
|
||||
$(eval $(call _transform-jar-to-toc,$1))\
|
||||
$(eval .KATI_RESTAT: $1.toc)
|
||||
endef
|
||||
|
||||
ifeq (,$(TARGET_BUILD_APPS))
|
||||
|
||||
## Rule to create a table of contents from a .dex file.
|
||||
|
@ -2521,7 +2508,7 @@ $(hide) $(JAVA) \
|
|||
-Djdk.internal.lambda.dumpProxyClasses=$(abspath $(dir $@))/desugar_dumped_classes \
|
||||
-jar $(DESUGAR) \
|
||||
$(addprefix --bootclasspath_entry ,$(call desugar-bootclasspath,$(PRIVATE_BOOTCLASSPATH))) \
|
||||
$(addprefix --classpath_entry ,$(PRIVATE_ALL_JAVA_HEADER_LIBRARIES)) \
|
||||
$(addprefix --classpath_entry ,$(PRIVATE_ALL_JAVA_LIBRARIES)) \
|
||||
--min_sdk_version $(call codename-or-sdk-to-sdk,$(PRIVATE_DEFAULT_APP_TARGET_SDK)) \
|
||||
--desugar_try_with_resources_if_needed=false \
|
||||
--allow_empty_bootclasspath \
|
||||
|
@ -2740,15 +2727,8 @@ endef
|
|||
# Note: we intentionally don't clean PRIVATE_CLASS_INTERMEDIATES_DIR
|
||||
# in transform-java-to-classes for the sake of vm-tests.
|
||||
define transform-host-java-to-package
|
||||
@echo "Host Java: $(PRIVATE_MODULE) ($(PRIVATE_CLASS_INTERMEDIATES_DIR))"
|
||||
$(call compile-java,$(HOST_JAVAC),$(PRIVATE_BOOTCLASSPATH),$(PRIVATE_ALL_JAVA_LIBRARIES))
|
||||
endef
|
||||
|
||||
# Note: we intentionally don't clean PRIVATE_CLASS_INTERMEDIATES_DIR
|
||||
# in transform-java-to-classes for the sake of vm-tests.
|
||||
define transform-host-java-to-dalvik-package
|
||||
@echo "Dalvik Java: $(PRIVATE_MODULE) ($(PRIVATE_CLASS_INTERMEDIATES_DIR))"
|
||||
$(call compile-java,$(HOST_JAVAC),$(PRIVATE_BOOTCLASSPATH),$(PRIVATE_ALL_JAVA_HEADER_LIBRARIES))
|
||||
@echo "$($(PRIVATE_PREFIX)DISPLAY) Java: $(PRIVATE_MODULE) ($(PRIVATE_CLASS_INTERMEDIATES_DIR))"
|
||||
$(call compile-java,$(HOST_JAVAC),$(PRIVATE_BOOTCLASSPATH))
|
||||
endef
|
||||
|
||||
###########################################################
|
||||
|
|
|
@ -42,9 +42,6 @@ ifneq ($(LOCAL_NO_STANDARD_LIBRARIES),true)
|
|||
LOCAL_JAVA_LIBRARIES := core-oj-hostdex core-libart-hostdex $(LOCAL_JAVA_LIBRARIES)
|
||||
endif
|
||||
|
||||
full_classes_turbine_jar := $(intermediates.COMMON)/classes-turbine.jar
|
||||
full_classes_header_jarjar := $(intermediates.COMMON)/classes-header-jarjar.jar
|
||||
full_classes_header_jar := $(intermediates.COMMON)/classes-header.jar
|
||||
full_classes_compiled_jar := $(intermediates.COMMON)/classes-full-debug.jar
|
||||
full_classes_desugar_jar := $(intermediates.COMMON)/desugar.classes.jar
|
||||
full_classes_jarjar_jar := $(intermediates.COMMON)/classes-jarjar.jar
|
||||
|
@ -55,7 +52,6 @@ built_dex := $(intermediates.COMMON)/classes.dex
|
|||
java_source_list_file := $(intermediates.COMMON)/java-source-list
|
||||
|
||||
LOCAL_INTERMEDIATE_TARGETS += \
|
||||
$(full_classes_turbine_jar) \
|
||||
$(full_classes_compiled_jar) \
|
||||
$(full_classes_desugar_jar) \
|
||||
$(full_classes_jarjar_jar) \
|
||||
|
@ -102,54 +98,25 @@ $(java_source_list_file): $(java_sources_deps)
|
|||
ifndef LOCAL_JACK_ENABLED
|
||||
|
||||
$(full_classes_compiled_jar): PRIVATE_JAVA_LAYERS_FILE := $(layers_file)
|
||||
$(full_classes_compiled_jar): PRIVATE_JAVACFLAGS := $(LOCAL_JAVACFLAGS) $(annotation_processor_flags)
|
||||
$(full_classes_compiled_jar): PRIVATE_JAVACFLAGS := $(GLOBAL_JAVAC_DEBUG_FLAGS) $(LOCAL_JAVACFLAGS) $(annotation_processor_flags)
|
||||
$(full_classes_compiled_jar): PRIVATE_JAR_EXCLUDE_FILES :=
|
||||
$(full_classes_compiled_jar): PRIVATE_JAR_PACKAGES :=
|
||||
$(full_classes_compiled_jar): PRIVATE_JAR_EXCLUDE_PACKAGES :=
|
||||
$(full_classes_compiled_jar): \
|
||||
$(java_source_list_file) \
|
||||
$(java_sources_deps) \
|
||||
$(full_java_header_libs) \
|
||||
$(full_static_java_libs) \
|
||||
$(full_java_lib_deps) \
|
||||
$(jar_manifest_file) \
|
||||
$(annotation_processor_deps) \
|
||||
$(NORMALIZE_PATH) \
|
||||
$(JAR_ARGS) \
|
||||
| $(SOONG_JAVAC_WRAPPER)
|
||||
$(transform-host-java-to-dalvik-package)
|
||||
|
||||
$(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): \
|
||||
$(java_source_list_file) \
|
||||
$(java_sources_deps) \
|
||||
$(full_java_header_libs) \
|
||||
$(jar_manifest_file) \
|
||||
$(NORMALIZE_PATH) \
|
||||
$(JAR_ARGS) \
|
||||
$(ZIPTIME) \
|
||||
| $(TURBINE)
|
||||
$(transform-java-to-header.jar)
|
||||
|
||||
.KATI_RESTAT: $(full_classes_turbine_jar)
|
||||
|
||||
# Run jarjar before generate classes-header.jar if necessary.
|
||||
ifneq ($(strip $(LOCAL_JARJAR_RULES)),)
|
||||
$(full_classes_header_jarjar): PRIVATE_JARJAR_RULES := $(LOCAL_JARJAR_RULES)
|
||||
$(full_classes_header_jarjar): $(full_classes_turbine_jar) $(LOCAL_JARJAR_RULES) | $(JARJAR)
|
||||
@echo Header JarJar: $@
|
||||
$(hide) $(JAVA) -jar $(JARJAR) process $(PRIVATE_JARJAR_RULES) $< $@
|
||||
else
|
||||
full_classes_header_jarjar := $(full_classes_turbine_jar)
|
||||
endif
|
||||
|
||||
$(eval $(call copy-one-file,$(full_classes_header_jarjar),$(full_classes_header_jar)))
|
||||
$(transform-host-java-to-package)
|
||||
|
||||
my_desugaring :=
|
||||
ifeq ($(LOCAL_JAVA_LANGUAGE_VERSION),1.8)
|
||||
my_desugaring := true
|
||||
$(full_classes_desugar_jar): PRIVATE_DX_FLAGS := $(LOCAL_DX_FLAGS)
|
||||
$(full_classes_desugar_jar): $(full_classes_compiled_jar) $(full_java_header_libs) $(DESUGAR)
|
||||
$(full_classes_desugar_jar): $(full_classes_compiled_jar) $(DESUGAR)
|
||||
$(desugar-classes-jar)
|
||||
endif
|
||||
|
||||
|
|
|
@ -35,7 +35,6 @@ 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
|
||||
java_source_list_file := $(intermediates.COMMON)/java-source-list
|
||||
full_classes_header_jar := $(intermediates.COMMON)/classes-header.jar
|
||||
|
||||
LOCAL_INTERMEDIATE_TARGETS += \
|
||||
$(full_classes_compiled_jar) \
|
||||
|
@ -72,7 +71,7 @@ $(java_source_list_file): $(java_sources_deps)
|
|||
$(write-java-source-list)
|
||||
|
||||
$(full_classes_compiled_jar): PRIVATE_JAVA_LAYERS_FILE := $(layers_file)
|
||||
$(full_classes_compiled_jar): PRIVATE_JAVACFLAGS := $(LOCAL_JAVACFLAGS) $(annotation_processor_flags)
|
||||
$(full_classes_compiled_jar): PRIVATE_JAVACFLAGS := $(GLOBAL_JAVAC_DEBUG_FLAGS) $(LOCAL_JAVACFLAGS) $(annotation_processor_flags)
|
||||
$(full_classes_compiled_jar): PRIVATE_JAR_EXCLUDE_FILES :=
|
||||
$(full_classes_compiled_jar): PRIVATE_JAR_PACKAGES :=
|
||||
$(full_classes_compiled_jar): PRIVATE_JAR_EXCLUDE_PACKAGES :=
|
||||
|
@ -84,7 +83,6 @@ $(full_classes_compiled_jar): \
|
|||
$(annotation_processor_deps) \
|
||||
$(NORMALIZE_PATH) \
|
||||
$(ZIPTIME) \
|
||||
$(JAR_ARGS) \
|
||||
| $(SOONG_JAVAC_WRAPPER)
|
||||
$(transform-host-java-to-package)
|
||||
$(remove-timestamps-from-package)
|
||||
|
@ -112,4 +110,3 @@ 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)))
|
||||
|
||||
$(eval $(call copy-one-file,$(LOCAL_FULL_CLASSES_JACOCO_JAR),$(full_classes_header_jar)))
|
||||
|
|
55
core/java.mk
55
core/java.mk
|
@ -113,9 +113,6 @@ ifeq ($(LOCAL_PROGUARD_ENABLED),disabled)
|
|||
LOCAL_PROGUARD_ENABLED :=
|
||||
endif
|
||||
|
||||
full_classes_turbine_jar := $(intermediates.COMMON)/classes-turbine.jar
|
||||
full_classes_header_jarjar := $(intermediates.COMMON)/classes-header-jarjar.jar
|
||||
full_classes_header_jar := $(intermediates.COMMON)/classes-header.jar
|
||||
full_classes_compiled_jar := $(intermediates.COMMON)/$(full_classes_compiled_jar_leaf)
|
||||
full_classes_processed_jar := $(intermediates.COMMON)/classes-processed.jar
|
||||
full_classes_desugar_jar := $(intermediates.COMMON)/classes-desugar.jar
|
||||
|
@ -142,7 +139,6 @@ noshrob_classes_jack := $(intermediates.COMMON)/classes.noshrob.jack
|
|||
jack_check_timestamp := $(intermediates.COMMON)/jack.check.timestamp
|
||||
|
||||
LOCAL_INTERMEDIATE_TARGETS += \
|
||||
$(full_classes_turbine_jar) \
|
||||
$(full_classes_compiled_jar) \
|
||||
$(full_classes_desugar_jar) \
|
||||
$(full_classes_jarjar_jar) \
|
||||
|
@ -156,6 +152,7 @@ LOCAL_INTERMEDIATE_TARGETS += \
|
|||
$(full_classes_stubs_jar) \
|
||||
$(java_source_list_file)
|
||||
|
||||
|
||||
LOCAL_INTERMEDIATE_SOURCE_DIR := $(intermediates.COMMON)/src
|
||||
|
||||
###############################################################
|
||||
|
@ -464,7 +461,7 @@ java_sources_deps := \
|
|||
$(java_source_list_file): $(java_sources_deps)
|
||||
$(write-java-source-list)
|
||||
|
||||
$(full_classes_compiled_jar): PRIVATE_JAVACFLAGS := $(LOCAL_JAVACFLAGS) $(annotation_processor_flags)
|
||||
$(full_classes_compiled_jar): PRIVATE_JAVACFLAGS := $(GLOBAL_JAVAC_DEBUG_FLAGS) $(LOCAL_JAVACFLAGS) $(annotation_processor_flags)
|
||||
$(full_classes_compiled_jar): PRIVATE_JAR_EXCLUDE_FILES := $(LOCAL_JAR_EXCLUDE_FILES)
|
||||
$(full_classes_compiled_jar): PRIVATE_JAR_PACKAGES := $(LOCAL_JAR_PACKAGES)
|
||||
$(full_classes_compiled_jar): PRIVATE_JAR_EXCLUDE_PACKAGES := $(LOCAL_JAR_EXCLUDE_PACKAGES)
|
||||
|
@ -473,44 +470,14 @@ $(full_classes_compiled_jar): PRIVATE_JAVA_SOURCE_LIST := $(java_source_list_fil
|
|||
$(full_classes_compiled_jar): \
|
||||
$(java_source_list_file) \
|
||||
$(java_sources_deps) \
|
||||
$(full_java_header_libs) \
|
||||
$(full_static_java_libs) \
|
||||
$(full_java_lib_deps) \
|
||||
$(jar_manifest_file) \
|
||||
$(layers_file) \
|
||||
$(annotation_processor_deps) \
|
||||
$(NORMALIZE_PATH) \
|
||||
$(JAR_ARGS) \
|
||||
| $(SOONG_JAVAC_WRAPPER)
|
||||
$(transform-java-to-classes.jar)
|
||||
|
||||
$(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): \
|
||||
$(java_source_list_file) \
|
||||
$(java_sources_deps) \
|
||||
$(full_java_header_libs) \
|
||||
$(jar_manifest_file) \
|
||||
$(layers_file) \
|
||||
$(NORMALIZE_PATH) \
|
||||
$(JAR_ARGS) \
|
||||
$(ZIPTIME) \
|
||||
| $(TURBINE)
|
||||
$(transform-java-to-header.jar)
|
||||
|
||||
.KATI_RESTAT: $(full_classes_turbine_jar)
|
||||
|
||||
# Run jarjar before generate classes-header.jar if necessary.
|
||||
ifneq ($(strip $(LOCAL_JARJAR_RULES)),)
|
||||
$(full_classes_header_jarjar): PRIVATE_JARJAR_RULES := $(LOCAL_JARJAR_RULES)
|
||||
$(full_classes_header_jarjar): $(full_classes_turbine_jar) $(LOCAL_JARJAR_RULES) | $(JARJAR)
|
||||
@echo Header JarJar: $@
|
||||
$(hide) $(JAVA) -jar $(JARJAR) process $(PRIVATE_JARJAR_RULES) $< $@
|
||||
else
|
||||
full_classes_header_jarjar := $(full_classes_turbine_jar)
|
||||
endif
|
||||
|
||||
$(eval $(call copy-one-file,$(full_classes_header_jarjar),$(full_classes_header_jar)))
|
||||
|
||||
javac-check : $(full_classes_compiled_jar)
|
||||
javac-check-$(LOCAL_MODULE) : $(full_classes_compiled_jar)
|
||||
|
||||
|
@ -545,7 +512,7 @@ ifndef LOCAL_JACK_ENABLED
|
|||
ifndef LOCAL_IS_STATIC_JAVA_LIBRARY
|
||||
my_desugaring := true
|
||||
$(full_classes_desugar_jar): PRIVATE_DX_FLAGS := $(LOCAL_DX_FLAGS)
|
||||
$(full_classes_desugar_jar): $(full_classes_processed_jar) $(full_java_header_libs) $(DESUGAR)
|
||||
$(full_classes_desugar_jar): $(full_classes_processed_jar) $(DESUGAR)
|
||||
$(desugar-classes-jar)
|
||||
endif
|
||||
endif
|
||||
|
@ -594,22 +561,19 @@ ifneq (,$(filter android-support-%,$(LOCAL_STATIC_JAVA_LIBRARIES)))
|
|||
ifdef LOCAL_SDK_VERSION
|
||||
ifdef TARGET_BUILD_APPS
|
||||
ifeq (,$(filter current system_current test_current, $(LOCAL_SDK_VERSION)))
|
||||
my_support_library_sdk_raise := $(call java-lib-header-files, sdk_vcurrent)
|
||||
my_support_library_sdk_raise := $(call java-lib-files, sdk_vcurrent)
|
||||
endif
|
||||
else
|
||||
# For platform build, we can't just raise to the "current" SDK,
|
||||
# that would break apps that use APIs removed from the current SDK.
|
||||
my_support_library_sdk_raise := $(call java-lib-header-files,$(TARGET_DEFAULT_JAVA_LIBRARIES))
|
||||
my_support_library_sdk_raise := $(call java-lib-files,$(TARGET_DEFAULT_JAVA_LIBRARIES))
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
# jack already has the libraries in its classpath and doesn't support jars
|
||||
legacy_proguard_flags := $(addprefix -libraryjars ,$(my_support_library_sdk_raise) \
|
||||
$(filter-out $(my_support_library_sdk_raise),$(full_shared_java_header_libs)))
|
||||
|
||||
legacy_proguard_lib_deps := $(my_support_library_sdk_raise) \
|
||||
$(filter-out $(my_support_library_sdk_raise),$(full_shared_java_header_libs))
|
||||
$(filter-out $(my_support_library_sdk_raise),$(full_shared_java_libs)))
|
||||
|
||||
legacy_proguard_flags += -printmapping $(proguard_dictionary)
|
||||
jack_proguard_flags := -printmapping $(jack_dictionary)
|
||||
|
@ -654,7 +618,6 @@ ifeq ($(filter obfuscation,$(LOCAL_PROGUARD_ENABLED)),)
|
|||
# link_instr_classes_jar is defined in base_rule.mk
|
||||
# jack already has this library in its classpath and doesn't support jars
|
||||
legacy_proguard_flags += -libraryjars $(link_instr_classes_jar)
|
||||
legacy_proguard_lib_deps += $(link_instr_classes_jar)
|
||||
else # obfuscation
|
||||
# If obfuscation is enabled, the main app must be obfuscated too.
|
||||
# We need to run obfuscation using the main app's dictionary,
|
||||
|
@ -708,7 +671,7 @@ endif
|
|||
$(full_classes_proguard_jar): PRIVATE_PROGUARD_INJAR_FILTERS := $(proguard_injar_filters)
|
||||
$(full_classes_proguard_jar): PRIVATE_EXTRA_INPUT_JAR := $(extra_input_jar)
|
||||
$(full_classes_proguard_jar): PRIVATE_PROGUARD_FLAGS := $(legacy_proguard_flags) $(common_proguard_flags) $(LOCAL_PROGUARD_FLAGS)
|
||||
$(full_classes_proguard_jar) : $(full_classes_pre_proguard_jar) $(extra_input_jar) $(my_support_library_sdk_raise) $(common_proguard_flag_files) $(proguard_flag_files) $(legacy_proguard_lib_deps) | $(PROGUARD)
|
||||
$(full_classes_proguard_jar) : $(full_classes_pre_proguard_jar) $(extra_input_jar) $(my_support_library_sdk_raise) $(common_proguard_flag_files) $(proguard_flag_files) | $(PROGUARD)
|
||||
$(call transform-jar-to-proguard)
|
||||
|
||||
else # LOCAL_PROGUARD_ENABLED not defined
|
||||
|
@ -717,6 +680,8 @@ endif # LOCAL_PROGUARD_ENABLED defined
|
|||
|
||||
$(eval $(call copy-one-file,$(full_classes_proguard_jar),$(full_classes_jar)))
|
||||
|
||||
$(call define-jar-to-toc-rule, $(full_classes_jar))
|
||||
|
||||
ifneq ($(LOCAL_IS_STATIC_JAVA_LIBRARY),true)
|
||||
ifndef LOCAL_JACK_ENABLED
|
||||
$(built_dex_intermediate): PRIVATE_DX_FLAGS := $(LOCAL_DX_FLAGS)
|
||||
|
|
|
@ -171,13 +171,7 @@ full_static_java_libs := \
|
|||
$(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)
|
||||
|
||||
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_STATIC_JAVA_LIBRARIES := $(full_static_java_libs)
|
||||
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_STATIC_JAVA_HEADER_LIBRARIES := $(full_static_java_header_libs)
|
||||
|
||||
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_RESOURCE_DIR := $(LOCAL_RESOURCE_DIR)
|
||||
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_ASSET_DIR := $(LOCAL_ASSET_DIR)
|
||||
|
@ -204,18 +198,18 @@ ifeq ($(LOCAL_NO_STANDARD_LIBRARIES),true)
|
|||
# No bootclasspath. But we still need "" to prevent javac from using default host bootclasspath.
|
||||
my_bootclasspath := ""
|
||||
else # LOCAL_NO_STANDARD_LIBRARIES
|
||||
my_bootclasspath := $(call java-lib-header-files,core-oj):$(call java-lib-header-files,core-libart)
|
||||
my_bootclasspath := $(call java-lib-files,core-oj):$(call java-lib-files,core-libart)
|
||||
endif # LOCAL_NO_STANDARD_LIBRARIES
|
||||
else
|
||||
ifeq ($(LOCAL_SDK_VERSION)$(TARGET_BUILD_APPS),current)
|
||||
# LOCAL_SDK_VERSION is current and no TARGET_BUILD_APPS.
|
||||
my_bootclasspath := $(call java-lib-header-files,android_stubs_current)
|
||||
my_bootclasspath := $(call java-lib-files,android_stubs_current)
|
||||
else ifeq ($(LOCAL_SDK_VERSION)$(TARGET_BUILD_APPS),system_current)
|
||||
my_bootclasspath := $(call java-lib-header-files,android_system_stubs_current)
|
||||
my_bootclasspath := $(call java-lib-files,android_system_stubs_current)
|
||||
else ifeq ($(LOCAL_SDK_VERSION)$(TARGET_BUILD_APPS),test_current)
|
||||
my_bootclasspath := $(call java-lib-header-files,android_test_stubs_current)
|
||||
my_bootclasspath := $(call java-lib-files,android_test_stubs_current)
|
||||
else
|
||||
my_bootclasspath := $(call java-lib-header-files,sdk_v$(LOCAL_SDK_VERSION))
|
||||
my_bootclasspath := $(call java-lib-files,sdk_v$(LOCAL_SDK_VERSION))
|
||||
endif # current, system_current, or test_current
|
||||
endif # LOCAL_SDK_VERSION
|
||||
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_BOOTCLASSPATH := -bootclasspath $(my_bootclasspath)
|
||||
|
@ -233,7 +227,6 @@ endif
|
|||
endif
|
||||
|
||||
full_shared_java_libs := $(call java-lib-files,$(LOCAL_JAVA_LIBRARIES) $(my_additional_javac_libs),$(LOCAL_IS_HOST_MODULE))
|
||||
full_shared_java_header_libs := $(call java-lib-header-files,$(LOCAL_JAVA_LIBRARIES) $(my_additional_javac_libs),$(LOCAL_IS_HOST_MODULE))
|
||||
full_java_lib_deps := $(call java-lib-deps,$(LOCAL_JAVA_LIBRARIES) $(my_additional_javac_libs),$(LOCAL_IS_HOST_MODULE))
|
||||
full_java_lib_deps := $(addsuffix .toc, $(full_java_lib_deps))
|
||||
|
||||
|
@ -243,12 +236,11 @@ ifeq ($(USE_CORE_LIB_BOOTCLASSPATH),true)
|
|||
ifeq ($(LOCAL_NO_STANDARD_LIBRARIES),true)
|
||||
my_bootclasspath := ""
|
||||
else
|
||||
my_bootclasspath := $(call normalize-path-list,$(call java-lib-header-files,core-oj-hostdex core-libart-hostdex,true))
|
||||
my_bootclasspath := $(call normalize-path-list,$(call java-lib-files,core-oj-hostdex core-libart-hostdex,true))
|
||||
endif
|
||||
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_BOOTCLASSPATH := -bootclasspath $(my_bootclasspath)
|
||||
|
||||
full_shared_java_libs := $(call java-lib-files,$(LOCAL_JAVA_LIBRARIES),true)
|
||||
full_shared_java_header_libs := $(call java-lib-header-files,$(LOCAL_JAVA_LIBRARIES),true)
|
||||
full_java_lib_deps := $(full_shared_java_libs)
|
||||
else # !USE_CORE_LIB_BOOTCLASSPATH
|
||||
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_BOOTCLASSPATH :=
|
||||
|
@ -259,10 +251,7 @@ full_java_lib_deps := $(full_shared_java_libs)
|
|||
endif # USE_CORE_LIB_BOOTCLASSPATH
|
||||
endif # !LOCAL_IS_HOST_MODULE
|
||||
|
||||
# Only host java libraries use LOCAL_CLASSPATH.
|
||||
full_java_libs := $(full_shared_java_libs) $(full_static_java_libs) $(LOCAL_CLASSPATH)
|
||||
full_java_header_libs := $(full_shared_java_header_libs) $(full_static_java_header_libs)
|
||||
|
||||
full_java_lib_deps := $(full_java_lib_deps) $(full_static_java_libs) $(LOCAL_CLASSPATH)
|
||||
|
||||
ifndef LOCAL_IS_HOST_MODULE
|
||||
|
@ -278,7 +267,6 @@ ifneq ($(apk_libraries),)
|
|||
# link against the jar with full original names (before proguard processing).
|
||||
full_shared_java_libs += $(link_apk_libraries)
|
||||
full_java_libs += $(link_apk_libraries)
|
||||
full_java_header_libs += $(link_apk_libraries)
|
||||
full_java_lib_deps += $(link_apk_libraries)
|
||||
endif
|
||||
|
||||
|
@ -297,7 +285,6 @@ ifdef LOCAL_INSTRUMENTATION_FOR
|
|||
# link against the jar with full original names (before proguard processing).
|
||||
link_instr_classes_jar := $(link_instr_intermediates_dir.COMMON)/classes-pre-proguard.jar
|
||||
full_java_libs += $(link_instr_classes_jar)
|
||||
full_java_header_libs += $(link_instr_classes_jar)
|
||||
full_java_lib_deps += $(link_instr_classes_jar)
|
||||
endif # LOCAL_INSTRUMENTATION_FOR
|
||||
endif # LOCAL_IS_HOST_MODULE
|
||||
|
@ -346,7 +333,6 @@ endif
|
|||
endif # !LOCAL_IS_HOST_MODULE
|
||||
|
||||
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_ALL_JAVA_LIBRARIES := $(full_java_libs)
|
||||
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_ALL_JAVA_HEADER_LIBRARIES := $(full_java_header_libs)
|
||||
|
||||
ALL_MODULES.$(my_register_name).INTERMEDIATE_SOURCE_DIR := \
|
||||
$(ALL_MODULES.$(my_register_name).INTERMEDIATE_SOURCE_DIR) $(LOCAL_INTERMEDIATE_SOURCE_DIR)
|
||||
|
|
|
@ -86,16 +86,13 @@ $(common_javalib.jar) : $(built_dex) $(java_resource_sources) | $(ZIPTIME)
|
|||
ifdef LOCAL_JACK_ENABLED
|
||||
$(create-empty-package)
|
||||
else
|
||||
$(call initialize-package-file,$(PRIVATE_SOURCE_ARCHIVE),$@.tmp)
|
||||
$(call initialize-package-file,$(PRIVATE_SOURCE_ARCHIVE),$@)
|
||||
endif
|
||||
$(call add-dex-to-package-arg,$@.tmp)
|
||||
$(add-dex-to-package)
|
||||
ifdef LOCAL_JACK_ENABLED
|
||||
$(add-carried-jack-resources)
|
||||
endif
|
||||
$(hide) $(ZIPTIME) $@.tmp
|
||||
$(call commit-change-for-toc,$@)
|
||||
|
||||
.KATI_RESTAT: $(common_javalib.jar)
|
||||
$(remove-timestamps-from-package)
|
||||
|
||||
ifdef LOCAL_DEX_PREOPT
|
||||
ifneq ($(dexpreopt_boot_jar_module),) # boot jar
|
||||
|
|
|
@ -495,7 +495,6 @@ ifdef LOCAL_IS_HOST_MODULE
|
|||
# for host java libraries deps should be in the common dir, so we make a copy in
|
||||
# the common dir.
|
||||
common_classes_jar := $(intermediates.COMMON)/classes.jar
|
||||
common_header_jar := $(intermediates.COMMON)/classes-header.jar
|
||||
|
||||
$(common_classes_jar): PRIVATE_MODULE := $(LOCAL_MODULE)
|
||||
$(common_classes_jar): PRIVATE_PREFIX := $(my_prefix)
|
||||
|
@ -503,14 +502,10 @@ $(common_classes_jar): PRIVATE_PREFIX := $(my_prefix)
|
|||
$(common_classes_jar) : $(my_src_jar)
|
||||
$(transform-prebuilt-to-target)
|
||||
|
||||
$(common_header_jar) : $(my_src_jar)
|
||||
$(transform-prebuilt-to-target)
|
||||
|
||||
else # !LOCAL_IS_HOST_MODULE
|
||||
# for target java libraries, the LOCAL_BUILT_MODULE is in a product-specific dir,
|
||||
# while the deps should be in the common dir, so we make a copy in the common dir.
|
||||
common_classes_jar := $(intermediates.COMMON)/classes.jar
|
||||
common_header_jar := $(intermediates.COMMON)/classes-header.jar
|
||||
common_classes_pre_proguard_jar := $(intermediates.COMMON)/classes-pre-proguard.jar
|
||||
common_javalib_jar := $(intermediates.COMMON)/javalib.jar
|
||||
|
||||
|
@ -555,15 +550,14 @@ endif
|
|||
$(common_classes_jar) : $(my_src_jar)
|
||||
$(transform-prebuilt-to-target)
|
||||
|
||||
$(common_header_jar) : $(my_src_jar)
|
||||
$(transform-prebuilt-to-target)
|
||||
|
||||
$(common_classes_pre_proguard_jar) : $(my_src_jar)
|
||||
$(transform-prebuilt-to-target)
|
||||
|
||||
$(common_javalib_jar) : $(common_classes_jar)
|
||||
$(transform-prebuilt-to-target)
|
||||
|
||||
$(call define-jar-to-toc-rule, $(common_classes_jar))
|
||||
|
||||
ifdef LOCAL_USE_AAPT2
|
||||
ifneq ($(my_src_aar),)
|
||||
LOCAL_SDK_RES_VERSION:=$(strip $(LOCAL_SDK_RES_VERSION))
|
||||
|
|
|
@ -187,7 +187,6 @@ $(full_classes_jack): $(R_file_stamp)
|
|||
$(jack_check_timestamp): $(R_file_stamp)
|
||||
endif # LOCAL_JACK_ENABLED
|
||||
$(full_classes_compiled_jar): $(R_file_stamp)
|
||||
$(full_classes_turbine_jar): $(R_file_stamp)
|
||||
|
||||
|
||||
# if we have custom proguarding done use the proguarded classes jar instead of the normal classes jar
|
||||
|
|
Loading…
Reference in a new issue