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:
12
java/sdk.go
12
java/sdk.go
@@ -544,7 +544,7 @@ func createSdkFrameworkAidl(ctx android.SingletonContext) {
|
||||
|
||||
commitChangeForRestat(rule, tempPath, combinedAidl)
|
||||
|
||||
rule.Build(pctx, ctx, "framework_aidl", "generate framework.aidl")
|
||||
rule.Build("framework_aidl", "generate framework.aidl")
|
||||
}
|
||||
|
||||
// Creates a version of framework.aidl for the non-updatable part of the platform.
|
||||
@@ -558,7 +558,7 @@ func createNonUpdatableFrameworkAidl(ctx android.SingletonContext) {
|
||||
|
||||
commitChangeForRestat(rule, tempPath, combinedAidl)
|
||||
|
||||
rule.Build(pctx, ctx, "framework_non_updatable_aidl", "generate framework_non_updatable.aidl")
|
||||
rule.Build("framework_non_updatable_aidl", "generate framework_non_updatable.aidl")
|
||||
}
|
||||
|
||||
func createFrameworkAidl(stubsModules []string, path android.OutputPath, ctx android.SingletonContext) *android.RuleBuilder {
|
||||
@@ -586,7 +586,7 @@ func createFrameworkAidl(stubsModules []string, path android.OutputPath, ctx and
|
||||
}
|
||||
}
|
||||
|
||||
rule := android.NewRuleBuilder()
|
||||
rule := android.NewRuleBuilder(pctx, ctx)
|
||||
rule.MissingDeps(missingDeps)
|
||||
|
||||
var aidls android.Paths
|
||||
@@ -597,7 +597,7 @@ func createFrameworkAidl(stubsModules []string, path android.OutputPath, ctx and
|
||||
rule.Command().
|
||||
Text("rm -f").Output(aidl)
|
||||
rule.Command().
|
||||
BuiltTool(ctx, "sdkparcelables").
|
||||
BuiltTool("sdkparcelables").
|
||||
Input(jar).
|
||||
Output(aidl)
|
||||
|
||||
@@ -632,7 +632,7 @@ func nonUpdatableFrameworkAidlPath(ctx android.PathContext) android.OutputPath {
|
||||
func createAPIFingerprint(ctx android.SingletonContext) {
|
||||
out := ApiFingerprintPath(ctx)
|
||||
|
||||
rule := android.NewRuleBuilder()
|
||||
rule := android.NewRuleBuilder(pctx, ctx)
|
||||
|
||||
rule.Command().
|
||||
Text("rm -f").Output(out)
|
||||
@@ -659,7 +659,7 @@ func createAPIFingerprint(ctx android.SingletonContext) {
|
||||
Output(out)
|
||||
}
|
||||
|
||||
rule.Build(pctx, ctx, "api_fingerprint", "generate api_fingerprint.txt")
|
||||
rule.Build("api_fingerprint", "generate api_fingerprint.txt")
|
||||
}
|
||||
|
||||
func ApiFingerprintPath(ctx android.PathContext) android.OutputPath {
|
||||
|
Reference in New Issue
Block a user