Make CreateModule take an android.ModuleFactory

Reduce the boilerplate required to call CreateModule by taking an
android.ModuleFactory instead of a blueprint.ModuleFactory.

Test: m checkbuild
Change-Id: I1259d2dd3f7893b5319c333bc180727ac40f9e91
This commit is contained in:
Colin Cross
2019-09-25 11:33:01 -07:00
parent 505bcb88ed
commit 84dfc3d331
5 changed files with 14 additions and 14 deletions

View File

@@ -121,7 +121,7 @@ type TopDownMutatorContext interface {
Rename(name string)
CreateModule(blueprint.ModuleFactory, ...interface{})
CreateModule(ModuleFactory, ...interface{})
}
type topDownMutatorContext struct {
@@ -243,9 +243,9 @@ func (t *topDownMutatorContext) Rename(name string) {
t.Module().base().commonProperties.DebugName = name
}
func (t *topDownMutatorContext) CreateModule(factory blueprint.ModuleFactory, props ...interface{}) {
func (t *topDownMutatorContext) CreateModule(factory ModuleFactory, props ...interface{}) {
inherited := []interface{}{&t.Module().base().commonProperties, &t.Module().base().variableProperties}
t.bp.CreateModule(factory, append(inherited, props...)...)
t.bp.CreateModule(ModuleFactoryAdaptor(factory), append(inherited, props...)...)
}
func (b *bottomUpMutatorContext) MutatorName() string {