Refactor module registration
Refactor module registration so that it doesn't need to separately
track properties.
Test: builds, no change to out/soong/build.ninja
Change-Id: I152f019d227d8fa9872742c03cf2381c674d675b
diff --git a/build/codegen.go b/build/codegen.go
index ba6f214..8526bf1 100644
--- a/build/codegen.go
+++ b/build/codegen.go
@@ -22,8 +22,6 @@
"android/soong/android"
"sort"
"strings"
-
- "github.com/google/blueprint"
)
func codegen(ctx android.LoadHookContext, c *codegenProperties, library bool) {
@@ -159,10 +157,8 @@
return ret
}
-func installCodegenCustomizer(module blueprint.Module, props []interface{}, library bool) []interface{} {
+func installCodegenCustomizer(module android.Module, library bool) {
c := &codegenProperties{}
android.AddLoadHook(module, func(ctx android.LoadHookContext) { codegen(ctx, c, library) })
- props = append(props, c)
-
- return props
+ module.AddProperties(c)
}