From 4e9f5923c0e7cf0d7f845b90c7da65c24e44bcee Mon Sep 17 00:00:00 2001 From: Cole Faust Date: Wed, 13 Nov 2024 16:09:23 -0800 Subject: Use fewer OutputPaths A lot of the time, you really mean android.Path or android.WriteablePath instead of OutputPath. Also, many modules were holding onto OutputPaths/WriteablePaths after the files had already been generated, meaning they should no longer be treated as writable paths and are instead inputs into other actions. Change the type of those paths to just android.Path. Test: verified ninja files were unchanged on aosp_arm64-trunk_staging-userdebug Change-Id: Id773171bef59d855ba33c4b85cef268031cbec39 --- java/app.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'java/app.go') diff --git a/java/app.go b/java/app.go index 0939d174f..8bb73cb38 100644 --- a/java/app.go +++ b/java/app.go @@ -848,7 +848,7 @@ func (a *AndroidApp) createPrivappAllowlist(ctx android.ModuleContext) android.P packageName := packageNameProp.Get() fileName := "privapp_allowlist_" + packageName + ".xml" - outPath := android.PathForModuleOut(ctx, fileName).OutputPath + outPath := android.PathForModuleOut(ctx, fileName) ctx.Build(pctx, android.BuildParams{ Rule: modifyAllowlist, Input: android.PathForModuleSrc(ctx, *a.appProperties.Privapp_allowlist), @@ -857,7 +857,7 @@ func (a *AndroidApp) createPrivappAllowlist(ctx android.ModuleContext) android.P "packageName": packageName, }, }) - return &outPath + return outPath } func (a *AndroidApp) generateAndroidBuildActions(ctx android.ModuleContext) { -- cgit v1.2.3-59-g8ed1b