diff options
author | Colin Cross <ccross@android.com> | 2019-02-15 10:39:37 -0800 |
---|---|---|
committer | Colin Cross <ccross@android.com> | 2019-02-20 14:23:37 -0800 |
commit | acdd6940719125104dfd2f692990c99682f95f05 (patch) | |
tree | c68a0c59d926ac2dfd22122afb765d7eafa208f6 /java/hiddenapi_singleton.go | |
parent | 45df0bd15a986aa4e202e3ed75548929fd9bdc23 (diff) | |
download | android_build_soong-acdd6940719125104dfd2f692990c99682f95f05.tar.gz android_build_soong-acdd6940719125104dfd2f692990c99682f95f05.tar.bz2 android_build_soong-acdd6940719125104dfd2f692990c99682f95f05.zip |
Make RuleBuilder methods take Paths
There are no more Make paths being used in Soong now that
dexpreopting and hiddenapi are in Soong. Use the Path types
in the inputs to RuleBuilder, and fix all users of RuleBuilder.
Test: all soong tests
Test: m checkbuild
Change-Id: I886f803d9a3419a43b2cae412537645f94c5dfbf
Diffstat (limited to 'java/hiddenapi_singleton.go')
-rw-r--r-- | java/hiddenapi_singleton.go | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/java/hiddenapi_singleton.go b/java/hiddenapi_singleton.go index adbd3567..ba8b3e1f 100644 --- a/java/hiddenapi_singleton.go +++ b/java/hiddenapi_singleton.go @@ -170,14 +170,14 @@ func stubFlagsRule(ctx android.SingletonContext) { rule.MissingDeps(missingDeps) rule.Command(). - Tool(pctx.HostBinToolPath(ctx, "hiddenapi").String()). + Tool(pctx.HostBinToolPath(ctx, "hiddenapi")). Text("list"). - FlagForEachInput("--boot-dex=", bootDexJars.Strings()). - FlagWithInputList("--public-stub-classpath=", publicStubPaths.Strings(), ":"). - FlagWithInputList("--public-stub-classpath=", systemStubPaths.Strings(), ":"). - FlagWithInputList("--public-stub-classpath=", testStubPaths.Strings(), ":"). - FlagWithInputList("--core-platform-stub-classpath=", corePlatformStubPaths.Strings(), ":"). - FlagWithOutput("--out-api-flags=", tempPath.String()) + FlagForEachInput("--boot-dex=", bootDexJars). + FlagWithInputList("--public-stub-classpath=", publicStubPaths, ":"). + FlagWithInputList("--public-stub-classpath=", systemStubPaths, ":"). + FlagWithInputList("--public-stub-classpath=", testStubPaths, ":"). + FlagWithInputList("--core-platform-stub-classpath=", corePlatformStubPaths, ":"). + FlagWithOutput("--out-api-flags=", tempPath) commitChangeForRestat(rule, tempPath, outputPath) @@ -214,20 +214,20 @@ func flagsRule(ctx android.SingletonContext) android.Path { stubFlags := hiddenAPISingletonPaths(ctx).stubFlags rule.Command(). - Tool(android.PathForSource(ctx, "frameworks/base/tools/hiddenapi/generate_hiddenapi_lists.py").String()). - FlagWithInput("--csv ", stubFlags.String()). - Inputs(flagsCSV.Strings()). + Tool(android.PathForSource(ctx, "frameworks/base/tools/hiddenapi/generate_hiddenapi_lists.py")). + FlagWithInput("--csv ", stubFlags). + Inputs(flagsCSV). FlagWithInput("--greylist ", - android.PathForSource(ctx, "frameworks/base/config/hiddenapi-greylist.txt").String()). + android.PathForSource(ctx, "frameworks/base/config/hiddenapi-greylist.txt")). FlagWithInput("--greylist-ignore-conflicts ", - greylistIgnoreConflicts.String()). + greylistIgnoreConflicts). FlagWithInput("--greylist-max-p ", - android.PathForSource(ctx, "frameworks/base/config/hiddenapi-greylist-max-p.txt").String()). + android.PathForSource(ctx, "frameworks/base/config/hiddenapi-greylist-max-p.txt")). FlagWithInput("--greylist-max-o-ignore-conflicts ", - android.PathForSource(ctx, "frameworks/base/config/hiddenapi-greylist-max-o.txt").String()). + android.PathForSource(ctx, "frameworks/base/config/hiddenapi-greylist-max-o.txt")). FlagWithInput("--blacklist ", - android.PathForSource(ctx, "frameworks/base/config/hiddenapi-force-blacklist.txt").String()). - FlagWithOutput("--output ", tempPath.String()) + android.PathForSource(ctx, "frameworks/base/config/hiddenapi-force-blacklist.txt")). + FlagWithOutput("--output ", tempPath) commitChangeForRestat(rule, tempPath, outputPath) @@ -243,8 +243,8 @@ func emptyFlagsRule(ctx android.SingletonContext) android.Path { outputPath := hiddenAPISingletonPaths(ctx).flags - rule.Command().Text("rm").Flag("-f").Output(outputPath.String()) - rule.Command().Text("touch").Output(outputPath.String()) + rule.Command().Text("rm").Flag("-f").Output(outputPath) + rule.Command().Text("touch").Output(outputPath) rule.Build(pctx, ctx, "emptyHiddenAPIFlagsFile", "empty hiddenapi flags") @@ -269,10 +269,10 @@ func metadataRule(ctx android.SingletonContext) android.Path { outputPath := hiddenAPISingletonPaths(ctx).metadata rule.Command(). - Tool(android.PathForSource(ctx, "frameworks/base/tools/hiddenapi/merge_csv.py").String()). - Inputs(metadataCSV.Strings()). + Tool(android.PathForSource(ctx, "frameworks/base/tools/hiddenapi/merge_csv.py")). + Inputs(metadataCSV). Text(">"). - Output(outputPath.String()) + Output(outputPath) rule.Build(pctx, ctx, "hiddenAPIGreylistMetadataFile", "hiddenapi greylist metadata") @@ -284,15 +284,15 @@ func metadataRule(ctx android.SingletonContext) android.Path { // the rule. func commitChangeForRestat(rule *android.RuleBuilder, tempPath, outputPath android.WritablePath) { rule.Restat() - rule.Temporary(tempPath.String()) + rule.Temporary(tempPath) rule.Command(). Text("("). Text("if"). - Text("cmp -s").Input(tempPath.String()).Output(outputPath.String()).Text(";"). + Text("cmp -s").Input(tempPath).Output(outputPath).Text(";"). Text("then"). - Text("rm").Input(tempPath.String()).Text(";"). + Text("rm").Input(tempPath).Text(";"). Text("else"). - Text("mv").Input(tempPath.String()).Output(outputPath.String()).Text(";"). + Text("mv").Input(tempPath).Output(outputPath).Text(";"). Text("fi"). Text(")") } |