Use OutputFilesProvider on global_compat_config am: 9e7127ff3b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3137576 Change-Id: Icc49328fa96fbc0b5673bfa05d15ab20513804fd Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -15,7 +15,6 @@
|
|||||||
package java
|
package java
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
|
||||||
"android/soong/android"
|
"android/soong/android"
|
||||||
@@ -290,32 +289,23 @@ type globalCompatConfig struct {
|
|||||||
android.ModuleBase
|
android.ModuleBase
|
||||||
|
|
||||||
properties globalCompatConfigProperties
|
properties globalCompatConfigProperties
|
||||||
|
|
||||||
outputFilePath android.OutputPath
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *globalCompatConfig) GenerateAndroidBuildActions(ctx android.ModuleContext) {
|
func (c *globalCompatConfig) GenerateAndroidBuildActions(ctx android.ModuleContext) {
|
||||||
filename := String(c.properties.Filename)
|
filename := String(c.properties.Filename)
|
||||||
|
|
||||||
inputPath := platformCompatConfigPath(ctx)
|
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
|
// This ensures that outputFilePath has the correct name for others to
|
||||||
// use, as the source file may have a different name.
|
// use, as the source file may have a different name.
|
||||||
ctx.Build(pctx, android.BuildParams{
|
ctx.Build(pctx, android.BuildParams{
|
||||||
Rule: android.Cp,
|
Rule: android.Cp,
|
||||||
Output: c.outputFilePath,
|
Output: outputFilePath,
|
||||||
Input: inputPath,
|
Input: inputPath,
|
||||||
})
|
})
|
||||||
}
|
|
||||||
|
|
||||||
func (h *globalCompatConfig) OutputFiles(tag string) (android.Paths, error) {
|
ctx.SetOutputFiles(android.Paths{outputFilePath}, "")
|
||||||
switch tag {
|
|
||||||
case "":
|
|
||||||
return android.Paths{h.outputFilePath}, nil
|
|
||||||
default:
|
|
||||||
return nil, fmt.Errorf("unsupported module reference tag %q", tag)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// global_compat_config provides access to the merged compat config xml file generated by the build.
|
// global_compat_config provides access to the merged compat config xml file generated by the build.
|
||||||
|
Reference in New Issue
Block a user