Introduce Soong API CreateModuleInDirectory(...)
The method allows generating module in a specified directory. Note
that the method is only supported in LoadHookContext, and does not
support BottomUpMutatorContext.
Test: m nothing
Bug: 375053752
Change-Id: I40ac7678b280a89cdca932632811fef3a1494353
diff --git a/android/mutator.go b/android/mutator.go
index 6bd2e60..f2b94ac 100644
--- a/android/mutator.go
+++ b/android/mutator.go
@@ -742,8 +742,12 @@
return b.bp.CreateModule(factory, name, props...)
}
+func (b *bottomUpMutatorContext) createModuleInDirectory(factory blueprint.ModuleFactory, name string, _ string, props ...interface{}) blueprint.Module {
+ panic("createModuleInDirectory is not implemented for bottomUpMutatorContext")
+}
+
func (b *bottomUpMutatorContext) CreateModule(factory ModuleFactory, props ...interface{}) Module {
- return createModule(b, factory, "_bottomUpMutatorModule", props...)
+ return createModule(b, factory, "_bottomUpMutatorModule", doesNotSpecifyDirectory(), props...)
}
func (b *bottomUpMutatorContext) AddDependency(module blueprint.Module, tag blueprint.DependencyTag, name ...string) []blueprint.Module {