diff --git a/java/platform_compat_config.go b/java/platform_compat_config.go index 45b994498..7cc6231ad 100644 --- a/java/platform_compat_config.go +++ b/java/platform_compat_config.go @@ -15,7 +15,6 @@ package java import ( - "fmt" "path/filepath" "android/soong/android" @@ -290,32 +289,23 @@ type globalCompatConfig struct { android.ModuleBase properties globalCompatConfigProperties - - outputFilePath android.OutputPath } func (c *globalCompatConfig) GenerateAndroidBuildActions(ctx android.ModuleContext) { filename := String(c.properties.Filename) inputPath := platformCompatConfigPath(ctx) - c.outputFilePath = android.PathForModuleOut(ctx, filename).OutputPath + outputFilePath := android.PathForModuleOut(ctx, filename).OutputPath // This ensures that outputFilePath has the correct name for others to // use, as the source file may have a different name. ctx.Build(pctx, android.BuildParams{ Rule: android.Cp, - Output: c.outputFilePath, + Output: outputFilePath, Input: inputPath, }) -} -func (h *globalCompatConfig) OutputFiles(tag string) (android.Paths, error) { - switch tag { - case "": - return android.Paths{h.outputFilePath}, nil - default: - return nil, fmt.Errorf("unsupported module reference tag %q", tag) - } + ctx.SetOutputFiles(android.Paths{outputFilePath}, "") } // global_compat_config provides access to the merged compat config xml file generated by the build.