Support multiple sources for prebuilt_etc

Keep the Src attribute for compatibility. The new attribute (Srcs) is
mutually exclusive with Src.

Keep SourceFilePath and OutputFile for compatibility with other modules.
These can be removed in a follow up change.

Bug: 328313691
Test: presubmit
Test: m blueprint_tests
Test: prebuilts/build-tools/build-prebuilts.sh (on build-tools branch)
Change-Id: I5d5b2657715a7180a829c7ed0f501872d561b662
This commit is contained in:
Thiébaud Weksteen
2024-03-18 14:06:00 +11:00
parent 64342427b8
commit 00e8b31ee6
4 changed files with 168 additions and 83 deletions

View File

@@ -30,6 +30,7 @@ import (
"android/soong/android"
"android/soong/dexpreopt"
"android/soong/etc"
)
const (
@@ -3163,10 +3164,12 @@ func (module *sdkLibraryXml) SubDir() string {
}
// from android.PrebuiltEtcModule
func (module *sdkLibraryXml) OutputFile() android.OutputPath {
return module.outputFilePath
func (module *sdkLibraryXml) OutputFiles(tag string) (android.Paths, error) {
return android.OutputPaths{module.outputFilePath}.Paths(), nil
}
var _ etc.PrebuiltEtcModule = (*sdkLibraryXml)(nil)
// from android.ApexModule
func (module *sdkLibraryXml) AvailableFor(what string) bool {
return true