From 70c4741215a72d66209b2421157a04bf8b2c76d3 Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Fri, 12 Mar 2021 17:48:14 -0800 Subject: Add explicit rspfile argument to RuleBuilderCommand.FlagWithRspFileInputList Using $out.rsp as the rsp file adds extra complexity around keeping the $ unescaped. Make callers to FlagWithRspFileInputList provide an explicit path for the rsp file instead. Bug: 182612695 Test: rule_builder_test.go Change-Id: I3f531d80c1efa8a9d09aac0a63790c5b11a9f0c6 --- java/kotlin.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'java/kotlin.go') diff --git a/java/kotlin.go b/java/kotlin.go index 8067ad521..2960f819d 100644 --- a/java/kotlin.go +++ b/java/kotlin.go @@ -64,7 +64,9 @@ func kotlinCommonSrcsList(ctx android.ModuleContext, commonSrcFiles android.Path // 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(pctx, ctx) - rule.Command().Text("cp").FlagWithRspFileInputList("", commonSrcFiles).Output(commonSrcsList) + rule.Command().Text("cp"). + FlagWithRspFileInputList("", commonSrcsList.ReplaceExtension(ctx, "rsp"), commonSrcFiles). + Output(commonSrcsList) rule.Build("kotlin_common_srcs_list", "kotlin common_srcs list") return android.OptionalPathForPath(commonSrcsList) } -- cgit v1.2.3-59-g8ed1b