Make apex_set support ":<apex>" syntax to access the apex file
The apex and prebuilt_apex module types make the output APEX available using ":<apex>" syntax, e.g. for use as a data file in a test. This change adds compatible behavior to apex_set to ensure consistent behavior when building against prebuilts. Bug: 259958590 Test: m MODULE_BUILD_FROM_SOURCE=false nothing Change-Id: Ic6f105976cfdd6af4920cc1e11ab0b4ff72e6a6f
This commit is contained in:
@@ -915,6 +915,15 @@ 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{}
|
||||
|
Reference in New Issue
Block a user