Merge "Use OutputFilesProvider on sdk" into main am: 9b3fba9b0b am: 8ab5d0619a

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3138075

Change-Id: Iaca0ec42fef8bc334bae694351255182b8d84104
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Zi Wang
2024-06-20 16:46:12 +00:00
committed by Automerger Merge Worker

View File

@@ -193,6 +193,10 @@ func (s *sdk) GenerateAndroidBuildActions(ctx android.ModuleContext) {
// Generate the snapshot from the member info.
s.buildSnapshot(ctx, sdkVariants)
}
if s.snapshotFile.Valid() {
ctx.SetOutputFiles([]android.Path{s.snapshotFile.Path()}, "")
}
}
func (s *sdk) AndroidMkEntries() []android.AndroidMkEntries {
@@ -222,18 +226,6 @@ func (s *sdk) AndroidMkEntries() []android.AndroidMkEntries {
}}
}
func (s *sdk) OutputFiles(tag string) (android.Paths, error) {
switch tag {
case "":
if s.snapshotFile.Valid() {
return []android.Path{s.snapshotFile.Path()}, nil
}
return nil, fmt.Errorf("snapshot file not defined. This is most likely because this isn't the common_os variant of this module")
default:
return nil, fmt.Errorf("unknown tag %q", tag)
}
}
// gatherTraits gathers the traits from the dynamically generated trait specific properties.
//
// Returns a map from member name to the set of required traits.