Use OutputFilesProvider on global_compat_config
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: I6deb4a005876848f28a5b823a712d9eea33a44e6
This commit is contained in:
@@ -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.
|
||||
|
Reference in New Issue
Block a user