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:
@@ -57,7 +57,7 @@ func genAidl(ctx android.ModuleContext, aidlFiles android.Paths, aidlFlags strin
|
||||
|
||||
outDir := srcJarFile.ReplaceExtension(ctx, "tmp")
|
||||
|
||||
rule := android.NewRuleBuilder()
|
||||
rule := android.NewRuleBuilder(pctx, ctx)
|
||||
|
||||
rule.Command().Text("rm -rf").Flag(outDir.String())
|
||||
rule.Command().Text("mkdir -p").Flag(outDir.String())
|
||||
@@ -98,7 +98,7 @@ func genAidl(ctx android.ModuleContext, aidlFiles android.Paths, aidlFlags strin
|
||||
ruleDesc += " " + strconv.Itoa(i)
|
||||
}
|
||||
|
||||
rule.Build(pctx, ctx, ruleName, ruleDesc)
|
||||
rule.Build(ruleName, ruleDesc)
|
||||
}
|
||||
|
||||
return srcJarFiles
|
||||
|
Reference in New Issue
Block a user