Simplify vendor conditionals

Support vendor conditionals with no Go code.

Test: TestSoongConfigModule
Change-Id: I42546e7f17324921ada80f4d8e1cd399830f8dfc
This commit is contained in:
Colin Cross
2019-11-22 16:03:51 -08:00
parent f0f747c949
commit 9d34f35815
12 changed files with 1479 additions and 57 deletions

View File

@@ -62,6 +62,7 @@ type EarlyModuleContext interface {
ModuleName() string
ModuleDir() string
ModuleType() string
BlueprintsFile() string
ContainsProperty(name string) bool
Errorf(pos scanner.Position, fmt string, args ...interface{})
@@ -519,9 +520,13 @@ func (k moduleKind) String() string {
}
}
func initAndroidModuleBase(m Module) {
m.base().module = m
}
func InitAndroidModule(m Module) {
initAndroidModuleBase(m)
base := m.base()
base.module = m
m.AddProperties(
&base.nameProperties,