diff options
| author | 2021-05-11 07:18:06 +0000 | |
|---|---|---|
| committer | 2021-05-11 07:18:06 +0000 | |
| commit | f08e7c444ce8e92f8ce56e5c005281db9de9eb3c (patch) | |
| tree | 273b36ce783f1dfa655db837bf04a47a84349131 /android/sdk.go | |
| parent | 9a59e70fe190bb382034209cbb46a772dd7ce587 (diff) | |
| parent | 0d4ed0ac56b475cf0b820ecdc8431fdef2367adb (diff) | |
Merge "Allow sdk snapshot to contain source module type"
Diffstat (limited to 'android/sdk.go')
| -rw-r--r-- | android/sdk.go | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/android/sdk.go b/android/sdk.go index 0adfd89c3..2e057d9b7 100644 --- a/android/sdk.go +++ b/android/sdk.go @@ -405,6 +405,10 @@ type SdkMemberType interface { // the module is not allowed in whichever sdk property it was added. IsInstance(module Module) bool + // UsesSourceModuleTypeInSnapshot returns true when the AddPrebuiltModule() method returns a + // source module type. + UsesSourceModuleTypeInSnapshot() bool + // Add a prebuilt module that the sdk will populate. // // The sdk module code generates the snapshot as follows: @@ -451,6 +455,11 @@ type SdkMemberTypeBase struct { PropertyName string SupportsSdk bool HostOsDependent bool + + // When set to true UseSourceModuleTypeInSnapshot indicates that the member type creates a source + // module type in its SdkMemberType.AddPrebuiltModule() method. That prevents the sdk snapshot + // code from automatically adding a prefer: true flag. + UseSourceModuleTypeInSnapshot bool } func (b *SdkMemberTypeBase) SdkPropertyName() string { @@ -465,6 +474,10 @@ func (b *SdkMemberTypeBase) IsHostOsDependent() bool { return b.HostOsDependent } +func (b *SdkMemberTypeBase) UsesSourceModuleTypeInSnapshot() bool { + return b.UseSourceModuleTypeInSnapshot +} + // Encapsulates the information about registered SdkMemberTypes. type SdkMemberTypesRegistry struct { // The list of types sorted by property name. |