diff options
author | 2020-11-16 17:32:30 -0800 | |
---|---|---|
committer | 2020-12-01 16:22:16 -0800 | |
commit | f1a035e6be35d5678ce2e86bf3bc83fd5e4b4dc2 (patch) | |
tree | 097d3f1f4bf617eb5596166ee1803e3fd4b738c4 /java/sdk.go | |
parent | 33e17630944359f752cb4abcc80f79b2273645b8 (diff) |
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
Diffstat (limited to 'java/sdk.go')
-rw-r--r-- | java/sdk.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/java/sdk.go b/java/sdk.go index 971791f4a..32a4b5a88 100644 --- a/java/sdk.go +++ b/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 { |