Fix missing dependency on R.java
Compiling frameworks source is missing a dependency on the R.stamp file
generated by the frameworks-res aapt rule, likely caused by the switch
to jack. Use LOCAL_ADDITONAL_DEPENDENCIES to insert the dependency
instead of directly using build system internals.
Change-Id: Ifb830da18b3607f87ae283cea04f7d276d4bfde9
diff --git a/Android.mk b/Android.mk
index e7037c9..3b99111 100644
--- a/Android.mk
+++ b/Android.mk
@@ -485,6 +485,12 @@
$(framework_res_source_path)/android/Manifest.java \
$(framework_res_source_path)/com/android/internal/R.java
+# Make sure that R.java and Manifest.java are built before we build
+# the source for this library.
+framework_res_R_stamp := \
+ $(call intermediates-dir-for,APPS,framework-res,,COMMON)/src/R.stamp
+LOCAL_ADDITIONAL_DEPENDENCIES := $(framework_res_R_stamp)
+
LOCAL_NO_STANDARD_LIBRARIES := true
LOCAL_JAVA_LIBRARIES := core-oj core-libart core-lambda-stubs conscrypt okhttp core-junit bouncycastle ext
LOCAL_STATIC_JAVA_LIBRARIES := framework-protos
@@ -496,15 +502,8 @@
LOCAL_RMTYPEDEFS := true
include $(BUILD_JAVA_LIBRARY)
+
framework_module := $(LOCAL_INSTALLED_MODULE)
-
-# Make sure that R.java and Manifest.java are built before we build
-# the source for this library.
-framework_res_R_stamp := \
- $(call intermediates-dir-for,APPS,framework-res,,COMMON)/src/R.stamp
-$(full_classes_compiled_jar): $(framework_res_R_stamp)
-$(built_dex_intermediate): $(framework_res_R_stamp)
-
$(framework_module): | $(dir $(framework_module))framework-res.apk
framework_built := $(call java-lib-deps,framework)