Merge changes I31ea4954,Ia02f8160,I5cfea62e,If484e9eb
* changes: Remove missed PRODUCT_AAPT_FLAGS Allow soong java libraries to include exported resources and proguard flags Silence more duplicate path warnings Remove framework_res_package_export_deps
This commit is contained in:
commit
78d5ea8e9b
|
@ -235,6 +235,7 @@ LOCAL_SHARED_ANDROID_LIBRARIES:=
|
|||
LOCAL_SHARED_LIBRARIES:=
|
||||
LOCAL_SOONG_CLASSES_JAR :=
|
||||
LOCAL_SOONG_DEX_JAR :=
|
||||
LOCAL_SOONG_EXPORT_PROGUARD_FLAGS :=
|
||||
LOCAL_SOONG_HEADER_JAR :=
|
||||
LOCAL_SOONG_JACOCO_REPORT_CLASSES_JAR :=
|
||||
LOCAL_SOONG_PROGUARD_DICT :=
|
||||
|
|
|
@ -2326,9 +2326,9 @@ $(hide) if [ -s $(PRIVATE_JAVA_SOURCE_LIST) ] ; then \
|
|||
$(addprefix --classpath ,$(strip \
|
||||
$(call normalize-path-list,$(PRIVATE_ALL_JAVA_HEADER_LIBRARIES)))) \
|
||||
|| ( rm -rf $(dir $@)/classes-turbine ; exit 41 ) && \
|
||||
$(MERGE_ZIPS) -j -stripDir META-INF $@.tmp $@.premerged $(call reverse-list,$(PRIVATE_STATIC_JAVA_HEADER_LIBRARIES)) ; \
|
||||
$(MERGE_ZIPS) -j --ignore-duplicates -stripDir META-INF $@.tmp $@.premerged $(call reverse-list,$(PRIVATE_STATIC_JAVA_HEADER_LIBRARIES)) ; \
|
||||
else \
|
||||
$(MERGE_ZIPS) -j -stripDir META-INF $@.tmp $(call reverse-list,$(PRIVATE_STATIC_JAVA_HEADER_LIBRARIES)) ; \
|
||||
$(MERGE_ZIPS) -j --ignore-duplicates -stripDir META-INF $@.tmp $(call reverse-list,$(PRIVATE_STATIC_JAVA_HEADER_LIBRARIES)) ; \
|
||||
fi
|
||||
$(hide) $(ZIPTIME) $@.tmp
|
||||
$(hide) $(call commit-change-for-toc,$@)
|
||||
|
|
|
@ -428,7 +428,7 @@ aapt_flags :=
|
|||
endif
|
||||
endif
|
||||
|
||||
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_AAPT_FLAGS := $(LOCAL_AAPT_FLAGS) $(PRODUCT_AAPT_FLAGS)
|
||||
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_AAPT_FLAGS := $(LOCAL_AAPT_FLAGS)
|
||||
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_TARGET_AAPT_CHARACTERISTICS := $(TARGET_AAPT_CHARACTERISTICS)
|
||||
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_MANIFEST_PACKAGE_NAME := $(LOCAL_MANIFEST_PACKAGE_NAME)
|
||||
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_MANIFEST_INSTRUMENTATION_FOR := $(LOCAL_MANIFEST_INSTRUMENTATION_FOR)
|
||||
|
|
|
@ -465,7 +465,6 @@ $(foreach x,$(sharded_java_source_list_files),$(eval $(x): $(R_file_stamp)))
|
|||
endif # need_compile_res
|
||||
|
||||
framework_res_package_export :=
|
||||
framework_res_package_export_deps :=
|
||||
|
||||
ifneq ($(LOCAL_NO_STANDARD_LIBRARIES),true)
|
||||
# Most packages should link against the resources defined by framework-res.
|
||||
|
@ -477,15 +476,9 @@ else ifneq ($(filter-out current system_current test_current,$(LOCAL_SDK_RES_VER
|
|||
# for released sdk versions, the platform resources were built into android.jar.
|
||||
framework_res_package_export := \
|
||||
$(HISTORICAL_SDK_VERSIONS_ROOT)/$(LOCAL_SDK_RES_VERSION)/android.jar
|
||||
framework_res_package_export_deps := $(framework_res_package_export)
|
||||
else # LOCAL_SDK_RES_VERSION
|
||||
framework_res_package_export := \
|
||||
$(call intermediates-dir-for,APPS,framework-res,,COMMON)/package-export.apk
|
||||
# We can't depend directly on the export.apk file; it won't get its
|
||||
# PRIVATE_ vars set up correctly if we do. Instead, depend on the
|
||||
# corresponding R.stamp file, which lists the export.apk as a dependency.
|
||||
framework_res_package_export_deps := \
|
||||
$(dir $(framework_res_package_export))src/R.stamp
|
||||
endif # LOCAL_SDK_RES_VERSION
|
||||
endif # LOCAL_NO_STANDARD_LIBRARIES
|
||||
|
||||
|
@ -495,7 +488,7 @@ all_library_res_package_exports := \
|
|||
$(call intermediates-dir-for,APPS,$(lib),,COMMON)/package-export.apk)
|
||||
|
||||
all_library_res_package_export_deps := \
|
||||
$(framework_res_package_export_deps) \
|
||||
$(framework_res_package_export) \
|
||||
$(foreach lib,$(LOCAL_RES_LIBRARIES),\
|
||||
$(call intermediates-dir-for,APPS,$(lib),,COMMON)/src/R.stamp)
|
||||
$(resource_export_package) $(R_file_stamp) $(LOCAL_BUILT_MODULE): $(all_library_res_package_export_deps)
|
||||
|
|
|
@ -615,18 +615,14 @@ ifeq ($(LOCAL_SDK_RES_VERSION),)
|
|||
endif
|
||||
|
||||
framework_res_package_export :=
|
||||
framework_res_package_export_deps :=
|
||||
# Please refer to package.mk
|
||||
ifneq ($(LOCAL_NO_STANDARD_LIBRARIES),true)
|
||||
ifneq ($(filter-out current system_current test_current,$(LOCAL_SDK_RES_VERSION))$(if $(TARGET_BUILD_APPS),$(filter current system_current test_current,$(LOCAL_SDK_RES_VERSION))),)
|
||||
framework_res_package_export := \
|
||||
$(HISTORICAL_SDK_VERSIONS_ROOT)/$(LOCAL_SDK_RES_VERSION)/android.jar
|
||||
framework_res_package_export_deps := $(framework_res_package_export)
|
||||
else
|
||||
framework_res_package_export := \
|
||||
$(call intermediates-dir-for,APPS,framework-res,,COMMON)/package-export.apk
|
||||
framework_res_package_export_deps := \
|
||||
$(dir $(framework_res_package_export))src/R.stamp
|
||||
endif
|
||||
endif
|
||||
|
||||
|
@ -644,7 +640,7 @@ $(my_res_package): PRIVATE_DEFAULT_APP_TARGET_SDK :=
|
|||
$(my_res_package): PRIVATE_PRODUCT_AAPT_CONFIG :=
|
||||
$(my_res_package): PRIVATE_PRODUCT_AAPT_PREF_CONFIG :=
|
||||
$(my_res_package): PRIVATE_TARGET_AAPT_CHARACTERISTICS :=
|
||||
$(my_res_package) : $(framework_res_package_export_deps)
|
||||
$(my_res_package) : $(framework_res_package_export)
|
||||
|
||||
full_android_manifest :=
|
||||
my_res_resources :=
|
||||
|
|
|
@ -55,6 +55,7 @@ $(resource_export_package): $(LOCAL_SOONG_RESOURCE_EXPORT_PACKAGE)
|
|||
@echo "Copy: $$@"
|
||||
$(copy-file-to-target)
|
||||
touch $(PRIVATE_STAMP)
|
||||
$(call add-dependency,$(LOCAL_BUILT_MODULE),$(resource_export_package))
|
||||
|
||||
endif # LOCAL_SOONG_RESOURCE_EXPORT_PACKAGE
|
||||
|
||||
|
|
|
@ -39,6 +39,24 @@ ifdef LOCAL_SOONG_JACOCO_REPORT_CLASSES_JAR
|
|||
$(intermediates.COMMON)/jacoco-report-classes.jar)
|
||||
endif
|
||||
|
||||
ifdef LOCAL_SOONG_EXPORT_PROGUARD_FLAGS
|
||||
$(eval $(call copy-one-file,$(LOCAL_SOONG_EXPORT_PROGUARD_FLAGS),\
|
||||
$(intermediates.COMMON)/export_proguard_flags))
|
||||
$(call add-dependency,$(LOCAL_BUILT_MODULE),\
|
||||
$(intermediates.COMMON)/export_proguard_flags)
|
||||
endif
|
||||
|
||||
ifdef LOCAL_SOONG_RESOURCE_EXPORT_PACKAGE
|
||||
my_res_package := $(intermediates.COMMON)/package-res.apk
|
||||
|
||||
$(my_res_package): $(LOCAL_SOONG_RESOURCE_EXPORT_PACKAGE)
|
||||
@echo "Copy: $$@"
|
||||
$(copy-file-to-target)
|
||||
|
||||
$(call add-dependency,$(LOCAL_BUILT_MODULE),$(my_res_package))
|
||||
|
||||
endif # LOCAL_SOONG_RESOURCE_EXPORT_PACKAGE
|
||||
|
||||
ifneq ($(TURBINE_ENABLED),false)
|
||||
ifdef LOCAL_SOONG_HEADER_JAR
|
||||
$(eval $(call copy-one-file,$(LOCAL_SOONG_HEADER_JAR),$(full_classes_header_jar)))
|
||||
|
|
|
@ -103,18 +103,14 @@ ifeq ($(LOCAL_SDK_RES_VERSION),)
|
|||
endif
|
||||
|
||||
framework_res_package_export :=
|
||||
framework_res_package_export_deps :=
|
||||
# Please refer to package.mk
|
||||
ifneq ($(LOCAL_NO_STANDARD_LIBRARIES),true)
|
||||
ifneq ($(filter-out current system_current test_current,$(LOCAL_SDK_RES_VERSION))$(if $(TARGET_BUILD_APPS),$(filter current system_current test_current,$(LOCAL_SDK_RES_VERSION))),)
|
||||
framework_res_package_export := \
|
||||
$(HISTORICAL_SDK_VERSIONS_ROOT)/$(LOCAL_SDK_RES_VERSION)/android.jar
|
||||
framework_res_package_export_deps := $(framework_res_package_export)
|
||||
else
|
||||
framework_res_package_export := \
|
||||
$(call intermediates-dir-for,APPS,framework-res,,COMMON)/package-export.apk
|
||||
framework_res_package_export_deps := \
|
||||
$(dir $(framework_res_package_export))src/R.stamp
|
||||
endif
|
||||
endif
|
||||
|
||||
|
@ -175,10 +171,10 @@ my_generated_res_dirs_deps := $(RenderScript_file_stamp)
|
|||
endif # renderscript_target_api < 21
|
||||
endif # renderscript_target_api is set
|
||||
include $(BUILD_SYSTEM)/aapt2.mk
|
||||
$(my_res_package) : $(framework_res_package_export_deps)
|
||||
$(my_res_package) : $(framework_res_package_export)
|
||||
else
|
||||
$(R_file_stamp): PRIVATE_RESOURCE_LIST := $(all_resources)
|
||||
$(R_file_stamp) : $(all_resources) $(full_android_manifest) $(AAPT) $(framework_res_package_export_deps)
|
||||
$(R_file_stamp) : $(all_resources) $(full_android_manifest) $(AAPT) $(framework_res_package_export)
|
||||
@echo "target R.java/Manifest.java: $(PRIVATE_MODULE) ($@)"
|
||||
$(create-resource-java-files)
|
||||
$(hide) find $(PRIVATE_SOURCE_INTERMEDIATES_DIR) -name R.java | xargs cat > $@
|
||||
|
|
Loading…
Reference in New Issue