Pass pctx and ctx to NewRuleBuilder
Enable the RuleBuilder and RuleBuilderCommand methods to access the BuilderContext by passing it to NewRuleBuilder instead of RuleBuilder.Build. Test: genrule_test.go Test: rule_builder_test.go Test: m checkbuild Change-Id: I63e6597e19167393876dc2259d6f521363b7dabc
This commit is contained in:
@@ -2176,12 +2176,12 @@ func (module *sdkLibraryXml) GenerateAndroidBuildActions(ctx android.ModuleConte
|
||||
xmlContent := fmt.Sprintf(permissionsTemplate, libName, module.implPath(ctx))
|
||||
|
||||
module.outputFilePath = android.PathForModuleOut(ctx, libName+".xml").OutputPath
|
||||
rule := android.NewRuleBuilder()
|
||||
rule := android.NewRuleBuilder(pctx, ctx)
|
||||
rule.Command().
|
||||
Text("/bin/bash -c \"echo -e '" + xmlContent + "'\" > ").
|
||||
Output(module.outputFilePath)
|
||||
|
||||
rule.Build(pctx, ctx, "java_sdk_xml", "Permission XML")
|
||||
rule.Build("java_sdk_xml", "Permission XML")
|
||||
|
||||
module.installDirPath = android.PathForModuleInstall(ctx, "etc", module.SubDir())
|
||||
}
|
||||
|
Reference in New Issue
Block a user