Merge "Use OutputFilesProvider on buildinfo_prop" into main am: 61f267504c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3155341 Change-Id: I8b5507b583bcb01c5d2d25107c32209b07a52f81 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -15,8 +15,6 @@
|
|||||||
package android
|
package android
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
|
||||||
|
|
||||||
"github.com/google/blueprint/proptools"
|
"github.com/google/blueprint/proptools"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -41,20 +39,10 @@ type buildinfoPropModule struct {
|
|||||||
installPath InstallPath
|
installPath InstallPath
|
||||||
}
|
}
|
||||||
|
|
||||||
var _ OutputFileProducer = (*buildinfoPropModule)(nil)
|
|
||||||
|
|
||||||
func (p *buildinfoPropModule) installable() bool {
|
func (p *buildinfoPropModule) installable() bool {
|
||||||
return proptools.BoolDefault(p.properties.Installable, true)
|
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 {
|
func shouldAddBuildThumbprint(config Config) bool {
|
||||||
knownOemProperties := []string{
|
knownOemProperties := []string{
|
||||||
"ro.product.brand",
|
"ro.product.brand",
|
||||||
@@ -76,6 +64,8 @@ func (p *buildinfoPropModule) GenerateAndroidBuildActions(ctx ModuleContext) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
p.outputFilePath = PathForModuleOut(ctx, p.Name()).OutputPath
|
p.outputFilePath = PathForModuleOut(ctx, p.Name()).OutputPath
|
||||||
|
ctx.SetOutputFiles(Paths{p.outputFilePath}, "")
|
||||||
|
|
||||||
if !ctx.Config().KatiEnabled() {
|
if !ctx.Config().KatiEnabled() {
|
||||||
WriteFileRule(ctx, p.outputFilePath, "# no buildinfo.prop if kati is disabled")
|
WriteFileRule(ctx, p.outputFilePath, "# no buildinfo.prop if kati is disabled")
|
||||||
return
|
return
|
||||||
|
Reference in New Issue
Block a user