diff options
author | 2024-05-20 18:39:44 +0200 | |
---|---|---|
committer | 2024-05-20 18:40:09 +0200 | |
commit | 44616ccdceac01959d0f084b8d86fc65c1dfa6ff (patch) | |
tree | 7a2ab7c82eda6f628cbc327454af13260b3f1cb1 /android/module_info_json.go | |
parent | 9b9d29b8458a63a54f9e79f888a5e6060e284f3f (diff) |
Dump the required modules into module-info.json
Certain applications, like tracking the dependency chain of modules,
knowing the "required" dependencies is required.
In this context, "required" here means the `required` field in
Android.bp files.
Bug: 339193439
Test: Inspect module-info.json for the `required` field
Change-Id: I420c781d410e715ef86823278f99e4ffe51f8022
Diffstat (limited to 'android/module_info_json.go')
-rw-r--r-- | android/module_info_json.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/android/module_info_json.go b/android/module_info_json.go index 1c0a38e5a..ee552dce5 100644 --- a/android/module_info_json.go +++ b/android/module_info_json.go @@ -17,6 +17,7 @@ type CoreModuleInfoJSON struct { HostDependencies []string `json:"host_dependencies,omitempty"` // $(sort $(ALL_MODULES.$(m).HOST_REQUIRED_FROM_TARGET)) TargetDependencies []string `json:"target_dependencies,omitempty"` // $(sort $(ALL_MODULES.$(m).TARGET_REQUIRED_FROM_HOST)) Data []string `json:"data,omitempty"` // $(sort $(ALL_MODULES.$(m).TEST_DATA)) + Required []string `json:"required,omitempty"` // $(sort $(ALL_MODULES.$(m).REQUIRED_FROM_TARGET)) } type ModuleInfoJSON struct { @@ -77,6 +78,7 @@ func encodeModuleInfoJSON(w io.Writer, moduleInfoJSON *ModuleInfoJSON) error { sortAndUnique(&moduleInfoJSONCopy.core.HostDependencies) sortAndUnique(&moduleInfoJSONCopy.core.TargetDependencies) sortAndUnique(&moduleInfoJSONCopy.core.Data) + sortAndUnique(&moduleInfoJSONCopy.core.Required) sortAndUnique(&moduleInfoJSONCopy.Class) sortAndUnique(&moduleInfoJSONCopy.Tags) |