summaryrefslogtreecommitdiff
path: root/android/sdk.go
diff options
context:
space:
mode:
Diffstat (limited to 'android/sdk.go')
-rw-r--r--android/sdk.go20
1 files changed, 19 insertions, 1 deletions
diff --git a/android/sdk.go b/android/sdk.go
index 533f2f4ec..07b94b246 100644
--- a/android/sdk.go
+++ b/android/sdk.go
@@ -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
}