summaryrefslogtreecommitdiff
path: root/apex/prebuilt.go
diff options
context:
space:
mode:
author mrziwang <mrziwang@google.com> 2024-06-13 11:26:04 -0700
committer mrziwang <mrziwang@google.com> 2024-06-13 11:26:04 -0700
commit1587b9ccaffc7cfddd09bdb780be189dcdc3c33c (patch)
tree1509e76e27b411ce9b88932f7b6c6e8938e353d1 /apex/prebuilt.go
parent22c8aca89318c722b3cab55c39b45e3d7b70be3e (diff)
Use OutputFilesProvider on prebuilt_apex and apex_set
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: I5cb79a2e39f7fdd791762bcde5a5bfb325985274
Diffstat (limited to 'apex/prebuilt.go')
-rw-r--r--apex/prebuilt.go22
1 files changed, 4 insertions, 18 deletions
diff --git a/apex/prebuilt.go b/apex/prebuilt.go
index 9ad5159b5..cf1d6a451 100644
--- a/apex/prebuilt.go
+++ b/apex/prebuilt.go
@@ -587,15 +587,6 @@ func (a *Prebuilt) hasSanitizedSource(sanitizer string) bool {
return false
}
-func (p *Prebuilt) OutputFiles(tag string) (android.Paths, error) {
- switch tag {
- case "":
- return android.Paths{p.outputApex}, nil
- default:
- return nil, fmt.Errorf("unsupported module reference tag %q", tag)
- }
-}
-
// prebuilt_apex imports an `.apex` file into the build graph as if it was built with apex.
func PrebuiltFactory() android.Module {
module := &Prebuilt{}
@@ -894,6 +885,8 @@ func (p *Prebuilt) GenerateAndroidBuildActions(ctx android.ModuleContext) {
p.installedFile = ctx.InstallFile(p.installDir, p.installFilename, p.inputApex, p.compatSymlinks...)
p.provenanceMetaDataFile = provenance.GenerateArtifactProvenanceMetaData(ctx, p.inputApex, p.installedFile)
}
+
+ ctx.SetOutputFiles(android.Paths{p.outputApex}, "")
}
func (p *Prebuilt) ProvenanceMetaDataFile() android.OutputPath {
@@ -1009,15 +1002,6 @@ func (a *ApexSet) hasSanitizedSource(sanitizer string) bool {
return false
}
-func (a *ApexSet) OutputFiles(tag string) (android.Paths, error) {
- switch tag {
- case "":
- return android.Paths{a.outputApex}, nil
- default:
- return nil, fmt.Errorf("unsupported module reference tag %q", tag)
- }
-}
-
// prebuilt_apex imports an `.apex` file into the build graph as if it was built with apex.
func apexSetFactory() android.Module {
module := &ApexSet{}
@@ -1121,6 +1105,8 @@ func (a *ApexSet) GenerateAndroidBuildActions(ctx android.ModuleContext) {
for _, overridden := range a.prebuiltCommonProperties.Overrides {
a.compatSymlinks = append(a.compatSymlinks, makeCompatSymlinks(overridden, ctx)...)
}
+
+ ctx.SetOutputFiles(android.Paths{a.outputApex}, "")
}
type systemExtContext struct {