Merge "Add apexes property to sdk"

This commit is contained in:
Paul Duffin
2022-07-07 10:40:00 +00:00
committed by Gerrit Code Review
9 changed files with 404 additions and 71 deletions

View File

@@ -677,6 +677,10 @@ type SdkMemberType interface {
// SupportedLinkages returns the names of the linkage variants supported by this module.
SupportedLinkages() []string
// ArePrebuiltsRequired returns true if prebuilts are required in the sdk snapshot, false
// otherwise.
ArePrebuiltsRequired() bool
// AddDependencies adds dependencies from the SDK module to all the module variants the member
// type contributes to the SDK. `names` is the list of module names given in the member type
// property (as returned by SdkPropertyName()) in the SDK module. The exact set of variants
@@ -782,7 +786,12 @@ type SdkMemberTypeBase struct {
// If not specified then it is assumed to be available on all targeted build releases.
SupportedBuildReleaseSpecification string
SupportsSdk bool
// Set to true if this must be usable with the sdk/sdk_snapshot module types. Otherwise, it will
// only be usable with module_exports/module_exports_snapshots module types.
SupportsSdk bool
// Set to true if prebuilt host artifacts of this member may be specific to the host OS. Only
// applicable to modules where HostSupported() is true.
HostOsDependent bool
// When set to true UseSourceModuleTypeInSnapshot indicates that the member type creates a source
@@ -790,6 +799,11 @@ type SdkMemberTypeBase struct {
// code from automatically adding a prefer: true flag.
UseSourceModuleTypeInSnapshot bool
// Set to proptools.BoolPtr(false) if this member does not generate prebuilts but is only provided
// to allow the sdk to gather members from this member's dependencies. If not specified then
// defaults to true.
PrebuiltsRequired *bool
// The list of supported traits.
Traits []SdkMemberTrait
}
@@ -814,6 +828,10 @@ func (b *SdkMemberTypeBase) IsHostOsDependent() bool {
return b.HostOsDependent
}
func (b *SdkMemberTypeBase) ArePrebuiltsRequired() bool {
return proptools.BoolDefault(b.PrebuiltsRequired, true)
}
func (b *SdkMemberTypeBase) UsesSourceModuleTypeInSnapshot() bool {
return b.UseSourceModuleTypeInSnapshot
}