Remove moduleInfoJSON from ModuleBase.

Bug: 358425833
Test: Manually verified all the generated ninja and mk files and CI.
Change-Id: I145272636b87b20e49c05e847336737cccc20f79
This commit is contained in:
Yu Liu
2024-08-27 19:50:13 +00:00
parent 3e4458bf52
commit 4297ad9046
2 changed files with 16 additions and 16 deletions

View File

@@ -266,6 +266,10 @@ type moduleContext struct {
buildParams []BuildParams
ruleParams map[blueprint.Rule]blueprint.RuleParams
variables map[string]string
// moduleInfoJSON can be filled out by GenerateAndroidBuildActions to write a JSON file that will
// be included in the final module-info.json produced by Make.
moduleInfoJSON *ModuleInfoJSON
}
var _ ModuleContext = &moduleContext{}
@@ -729,11 +733,11 @@ func (m *moduleContext) LicenseMetadataFile() Path {
}
func (m *moduleContext) ModuleInfoJSON() *ModuleInfoJSON {
if moduleInfoJSON := m.module.base().moduleInfoJSON; moduleInfoJSON != nil {
if moduleInfoJSON := m.moduleInfoJSON; moduleInfoJSON != nil {
return moduleInfoJSON
}
moduleInfoJSON := &ModuleInfoJSON{}
m.module.base().moduleInfoJSON = moduleInfoJSON
m.moduleInfoJSON = moduleInfoJSON
return moduleInfoJSON
}