*RequiredModuleNames functions are available via Module interface

...so that the required module names can be known to other modules

Bug: N/A
Test: m
Change-Id: Ib032b51c4ea4fd77bdebcf09b2d1c2aec1c8eb27
This commit is contained in:
Jiyong Park 2019-12-30 16:31:09 +09:00
parent 1b82e6a108
commit 6a8cf5fab4
1 changed files with 19 additions and 3 deletions

View File

@ -221,6 +221,10 @@ type Module interface {
// Get the visibility rules that control the visibility of this module.
visibility() []string
RequiredModuleNames() []string
HostRequiredModuleNames() []string
TargetRequiredModuleNames() []string
}
// Qualified id for a module
@ -887,6 +891,18 @@ func (m *ModuleBase) InRecovery() bool {
return m.base().commonProperties.ImageVariation == RecoveryVariation
}
func (m *ModuleBase) RequiredModuleNames() []string {
return m.base().commonProperties.Required
}
func (m *ModuleBase) HostRequiredModuleNames() []string {
return m.base().commonProperties.Host_required
}
func (m *ModuleBase) TargetRequiredModuleNames() []string {
return m.base().commonProperties.Target_required
}
func (m *ModuleBase) generateModuleTarget(ctx ModuleContext) {
allInstalledFiles := Paths{}
allCheckbuildFiles := Paths{}
@ -1877,15 +1893,15 @@ func (m *moduleContext) ExpandOptionalSource(srcFile *string, prop string) Optio
}
func (m *moduleContext) RequiredModuleNames() []string {
return m.module.base().commonProperties.Required
return m.module.RequiredModuleNames()
}
func (m *moduleContext) HostRequiredModuleNames() []string {
return m.module.base().commonProperties.Host_required
return m.module.HostRequiredModuleNames()
}
func (m *moduleContext) TargetRequiredModuleNames() []string {
return m.module.base().commonProperties.Target_required
return m.module.TargetRequiredModuleNames()
}
func (b *baseModuleContext) Glob(globPattern string, excludes []string) Paths {