From e4a549195cb75f24bb89742a1cc46967dc887dee Mon Sep 17 00:00:00 2001 From: Yike Date: Mon, 27 Jun 2022 16:43:23 +0800 Subject: [PATCH] Export the `host_required` property to module-info Some test modules such as `android_test` use the `host_required` attribute to include additional harness dependencies. For example, `CtsLibcoreTestCases` references `cts-dalvik-host-test-runner` in the `host_required` attribute since those jars are required by Tradefed at runtime. This information needs to present in module_info.json and exported to properly generate Bazel targets that include these runtime dependencies. Test: m out/target/product/coral/module-info.json Bug: 220991354 Change-Id: I8d2ab0da04c9f4aff17d290999c69ffe0534729f --- core/tasks/module-info.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/core/tasks/module-info.mk b/core/tasks/module-info.mk index 8097535d1d..4ef6eb8fcb 100644 --- a/core/tasks/module-info.mk +++ b/core/tasks/module-info.mk @@ -28,6 +28,7 @@ $(MODULE_INFO_JSON): '"runtime_dependencies": [$(foreach w,$(sort $(ALL_MODULES.$(m).LOCAL_RUNTIME_LIBRARIES)),"$(w)", )], ' \ '"data_dependencies": [$(foreach w,$(sort $(ALL_MODULES.$(m).TEST_DATA_BINS)),"$(w)", )], ' \ '"supported_variants": [$(foreach w,$(sort $(ALL_MODULES.$(m).SUPPORTED_VARIANTS)),"$(w)", )], ' \ + '"host_dependencies": [$(foreach w,$(sort $(ALL_MODULES.$(m).HOST_REQUIRED_FROM_TARGET)),"$(w)", )], ' \ '},\n' \ ) | sed -e 's/, *\]/]/g' -e 's/, *\}/ }/g' -e '$$s/,$$//' >> $@ $(hide) echo '}' >> $@