diff options
author | 2020-05-19 07:53:27 +0000 | |
---|---|---|
committer | 2020-05-19 07:53:27 +0000 | |
commit | 6b3ca917b0061c751d62ef99a76c15d56a53e084 (patch) | |
tree | 953931b70e556941677c7d75f6511ca23f2ebe2b /android/module.go | |
parent | 7b7aa8c3ef5ffa669b7baca9150a62703e9ddeb0 (diff) | |
parent | f88d8e032f494cc0d649f38fa8574103700dc59c (diff) |
Merge "Syntax check generated Android.bp snapshot"
Diffstat (limited to 'android/module.go')
-rw-r--r-- | android/module.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/android/module.go b/android/module.go index 7e64f0adf..45477ea80 100644 --- a/android/module.go +++ b/android/module.go @@ -104,6 +104,8 @@ type EarlyModuleContext interface { type BaseModuleContext interface { EarlyModuleContext + blueprintBaseModuleContext() blueprint.BaseModuleContext + OtherModuleName(m blueprint.Module) string OtherModuleDir(m blueprint.Module) string OtherModuleErrorf(m blueprint.Module, fmt string, args ...interface{}) @@ -1439,6 +1441,10 @@ func (b *baseModuleContext) GetDirectDepWithTag(name string, tag blueprint.Depen return b.bp.GetDirectDepWithTag(name, tag) } +func (b *baseModuleContext) blueprintBaseModuleContext() blueprint.BaseModuleContext { + return b.bp +} + type moduleContext struct { bp blueprint.ModuleContext baseModuleContext @@ -2361,3 +2367,8 @@ type IdeInfo struct { Installed_paths []string `json:"installed,omitempty"` SrcJars []string `json:"srcjars,omitempty"` } + +func CheckBlueprintSyntax(ctx BaseModuleContext, filename string, contents string) []error { + bpctx := ctx.blueprintBaseModuleContext() + return blueprint.CheckBlueprintSyntax(bpctx.ModuleFactories(), filename, contents) +} |