Revert "Simplify soong_java_prebuilt.mk and soong_app_prebuilt.mk"
This reverts commit a76cc6d732431ebb2ceddaf87445aedd548d1623.
Reason for revert: broke emma turbine build
Change-Id: Ie894565501d0de44f96dc736408a8c4e2ba2ed90
diff --git a/core/soong_app_prebuilt.mk b/core/soong_app_prebuilt.mk
index c50df07..f723633 100644
--- a/core/soong_app_prebuilt.mk
+++ b/core/soong_app_prebuilt.mk
@@ -27,22 +27,8 @@
full_classes_pre_proguard_jar := $(intermediates.COMMON)/classes-pre-proguard.jar
full_classes_header_jar := $(intermediates.COMMON)/classes-header.jar
-ifdef LOCAL_SOONG_CLASSES_JAR
- $(eval $(call copy-one-file,$(LOCAL_SOONG_CLASSES_JAR),$(full_classes_jar)))
- $(eval $(call copy-one-file,$(LOCAL_SOONG_CLASSES_JAR),$(full_classes_pre_proguard_jar)))
- $(eval $(call add-dependency,$(LOCAL_BUILT_MODULE),$(full_classes_jar)))
-
- ifneq ($(TURBINE_ENABLED),false)
- ifdef LOCAL_SOONG_HEADER_JAR
- $(eval $(call copy-one-file,$(LOCAL_SOONG_HEADER_JAR),$(full_classes_header_jar)))
- $(eval $(call add-dependency,$(full_classes_jar),$(full_classes_header_jar)))
- else
- $(eval $(call copy-one-file,$(full_classes_jar),$(full_classes_header_jar)))
- endif
- endif # TURBINE_ENABLED != false
-endif
-
-$(eval $(call copy-one-file,$(LOCAL_PREBUILT_MODULE_FILE),$(LOCAL_BUILT_MODULE)))
+$(eval $(call copy-one-file,$(LOCAL_SOONG_CLASSES_JAR),$(full_classes_jar)))
+$(eval $(call copy-one-file,$(LOCAL_SOONG_CLASSES_JAR),$(full_classes_pre_proguard_jar)))
ifdef LOCAL_SOONG_JACOCO_REPORT_CLASSES_JAR
$(eval $(call copy-one-file,$(LOCAL_SOONG_JACOCO_REPORT_CLASSES_JAR),\
@@ -58,6 +44,15 @@
$(intermediates.COMMON)/proguard_dictionary)
endif
+ifneq ($(TURBINE_ENABLED),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_ENABLED != false
+
+
ifdef LOCAL_SOONG_RESOURCE_EXPORT_PACKAGE
resource_export_package := $(intermediates.COMMON)/package-export.apk
resource_export_stamp := $(intermediates.COMMON)/src/R.stamp
@@ -79,6 +74,8 @@
$(eval $(call copy-one-file,$(LOCAL_SOONG_DEX_JAR),$(dir $(LOCAL_BUILT_MODULE))package.dex.apk))
endif
+$(eval $(call copy-one-file,$(LOCAL_PREBUILT_MODULE_FILE),$(LOCAL_BUILT_MODULE)))
+
my_built_installed := $(foreach f,$(LOCAL_SOONG_BUILT_INSTALLED),\
$(call word-colon,1,$(f)):$(PRODUCT_OUT)$(call word-colon,2,$(f)))
my_installed := $(call copy-many-files, $(my_built_installed))