Use OutputFilesProvider on buildinfo_prop and some android test modules

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: Ic0c1217f3651b14ae3ac58a0ce4a25e8ab8d4dda
This commit is contained in:
mrziwang
2024-06-27 12:53:08 -07:00
parent f58d7efa29
commit 89e4ff60d3
4 changed files with 32 additions and 72 deletions

View File

@@ -1183,9 +1183,6 @@ type pathForModuleSrcOutputFileProviderModule struct {
Outs []string
Tagged []string
}
outs Paths
tagged Paths
}
func pathForModuleSrcOutputFileProviderModuleFactory() Module {
@@ -1196,24 +1193,17 @@ func pathForModuleSrcOutputFileProviderModuleFactory() Module {
}
func (p *pathForModuleSrcOutputFileProviderModule) GenerateAndroidBuildActions(ctx ModuleContext) {
var outs, taggedOuts Paths
for _, out := range p.props.Outs {
p.outs = append(p.outs, PathForModuleOut(ctx, out))
outs = append(outs, PathForModuleOut(ctx, out))
}
for _, tagged := range p.props.Tagged {
p.tagged = append(p.tagged, PathForModuleOut(ctx, tagged))
taggedOuts = append(taggedOuts, PathForModuleOut(ctx, tagged))
}
}
func (p *pathForModuleSrcOutputFileProviderModule) OutputFiles(tag string) (Paths, error) {
switch tag {
case "":
return p.outs, nil
case ".tagged":
return p.tagged, nil
default:
return nil, fmt.Errorf("unsupported tag %q", tag)
}
ctx.SetOutputFiles(outs, "")
ctx.SetOutputFiles(taggedOuts, ".tagged")
}
type pathForModuleSrcTestCase struct {