Revert "Use OutputFilesProvider on buildinfo_prop and some android test modules"

This reverts commit 89e4ff60d3.

Reason for revert: build breakage on aosp-main/mainline_modules_sdks-trunk_staging-userdebug

Change-Id: I5ddac59f66a0e7a96fab39647d406499e3875f6a
This commit is contained in:
Zi Wang
2024-06-27 21:51:33 +00:00
committed by Gerrit Code Review
parent 89e4ff60d3
commit 9b21596db4
4 changed files with 72 additions and 32 deletions

View File

@@ -15,6 +15,7 @@
package android
import (
"fmt"
"testing"
"github.com/google/blueprint"
@@ -493,6 +494,7 @@ type prebuiltModule struct {
properties struct {
Srcs []string `android:"path,arch_variant"`
}
src Path
}
func newPrebuiltModule() Module {
@@ -508,17 +510,24 @@ func (p *prebuiltModule) Name() string {
}
func (p *prebuiltModule) GenerateAndroidBuildActions(ctx ModuleContext) {
var src Path
if len(p.properties.Srcs) >= 1 {
src = p.prebuilt.SingleSourcePath(ctx)
p.src = p.prebuilt.SingleSourcePath(ctx)
}
ctx.SetOutputFiles(Paths{src}, "")
}
func (p *prebuiltModule) Prebuilt() *Prebuilt {
return &p.prebuilt
}
func (p *prebuiltModule) OutputFiles(tag string) (Paths, error) {
switch tag {
case "":
return Paths{p.src}, nil
default:
return nil, fmt.Errorf("unsupported module reference tag %q", tag)
}
}
type sourceModuleProperties struct {
Deps []string `android:"path,arch_variant"`
}