diff options
author | 2024-01-03 17:55:47 +0000 | |
---|---|---|
committer | 2024-01-03 17:55:47 +0000 | |
commit | 138d37dd6c99a497e30b226e65b49c3b7f9d76cc (patch) | |
tree | a5fd9cdc9585b0b800ccd95ef49f8e8b40a7a816 /android/module_context.go | |
parent | 070490ce20919318ae966e742219c15d17b4b19d (diff) | |
parent | d6fd013394892f810ec40ce92809d2df9ee948ce (diff) |
Merge "Support generating module_info.json in Soong" into main
Diffstat (limited to 'android/module_context.go')
-rw-r--r-- | android/module_context.go | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/android/module_context.go b/android/module_context.go index 81692d5a2..e772f8bc4 100644 --- a/android/module_context.go +++ b/android/module_context.go @@ -210,6 +210,11 @@ type ModuleContext interface { // LicenseMetadataFile returns the path where the license metadata for this module will be // generated. LicenseMetadataFile() Path + + // ModuleInfoJSON returns a pointer to the ModuleInfoJSON struct that can be filled out by + // GenerateAndroidBuildActions. If it is called then the struct will be written out and included in + // the module-info.json generated by Make, and Make will not generate its own data for this module. + ModuleInfoJSON() *ModuleInfoJSON } type moduleContext struct { @@ -518,6 +523,8 @@ func (m *moduleContext) installFile(installPath InstallPath, name string, srcPat if !m.skipInstall() { deps = append(deps, InstallPaths(m.module.base().installFilesDepSet.ToList())...) + deps = append(deps, m.module.base().installedInitRcPaths...) + deps = append(deps, m.module.base().installedVintfFragmentsPaths...) var implicitDeps, orderOnlyDeps Paths @@ -695,6 +702,15 @@ func (m *moduleContext) LicenseMetadataFile() Path { return m.module.base().licenseMetadataFile } +func (m *moduleContext) ModuleInfoJSON() *ModuleInfoJSON { + if moduleInfoJSON := m.module.base().moduleInfoJSON; moduleInfoJSON != nil { + return moduleInfoJSON + } + moduleInfoJSON := &ModuleInfoJSON{} + m.module.base().moduleInfoJSON = moduleInfoJSON + return moduleInfoJSON +} + // Returns a list of paths expanded from globs and modules referenced using ":module" syntax. The property must // be tagged with `android:"path" to support automatic source module dependency resolution. // |