From 9429e0399643d6120d7c6dd245db2753b0c54433 Mon Sep 17 00:00:00 2001 From: mrziwang Date: Mon, 1 Jul 2024 11:42:28 -0700 Subject: [PATCH] Use OutputFilesProvider on buildinfo_prop In the context of incremental soong, the output files inter-module-communication will be through OutputFilesProvider. The OutputFileProducer interface will be deprecated. Test: CI Bug: 339477385 Change-Id: I0875ed4be72954187722276b10949a2ad4e66dcf --- android/buildinfo_prop.go | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/android/buildinfo_prop.go b/android/buildinfo_prop.go index defbff0b0..bba4c0d24 100644 --- a/android/buildinfo_prop.go +++ b/android/buildinfo_prop.go @@ -15,8 +15,6 @@ package android import ( - "fmt" - "github.com/google/blueprint/proptools" ) @@ -41,20 +39,10 @@ type buildinfoPropModule struct { installPath InstallPath } -var _ OutputFileProducer = (*buildinfoPropModule)(nil) - func (p *buildinfoPropModule) installable() bool { return proptools.BoolDefault(p.properties.Installable, true) } -// OutputFileProducer -func (p *buildinfoPropModule) OutputFiles(tag string) (Paths, error) { - if tag != "" { - return nil, fmt.Errorf("unsupported tag %q", tag) - } - return Paths{p.outputFilePath}, nil -} - func shouldAddBuildThumbprint(config Config) bool { knownOemProperties := []string{ "ro.product.brand", @@ -76,6 +64,8 @@ func (p *buildinfoPropModule) GenerateAndroidBuildActions(ctx ModuleContext) { return } p.outputFilePath = PathForModuleOut(ctx, p.Name()).OutputPath + ctx.SetOutputFiles(Paths{p.outputFilePath}, "") + if !ctx.Config().KatiEnabled() { WriteFileRule(ctx, p.outputFilePath, "# no buildinfo.prop if kati is disabled") return