From f1a035e6be35d5678ce2e86bf3bc83fd5e4b4dc2 Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Mon, 16 Nov 2020 17:32:30 -0800 Subject: 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 --- java/kotlin.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'java/kotlin.go') diff --git a/java/kotlin.go b/java/kotlin.go index e8c030aa7..8067ad521 100644 --- a/java/kotlin.go +++ b/java/kotlin.go @@ -63,9 +63,9 @@ func kotlinCommonSrcsList(ctx android.ModuleContext, commonSrcFiles android.Path // we can't use the rsp file because it is already being used for srcs. // Insert a second rule to write out the list of resources to a file. commonSrcsList := android.PathForModuleOut(ctx, "kotlinc_common_srcs.list") - rule := android.NewRuleBuilder() + rule := android.NewRuleBuilder(pctx, ctx) rule.Command().Text("cp").FlagWithRspFileInputList("", commonSrcFiles).Output(commonSrcsList) - rule.Build(pctx, ctx, "kotlin_common_srcs_list", "kotlin common_srcs list") + rule.Build("kotlin_common_srcs_list", "kotlin common_srcs list") return android.OptionalPathForPath(commonSrcsList) } return android.OptionalPath{} -- cgit v1.2.3-59-g8ed1b