Allow sdk members to vary by os type

Adds support for specifying separate members to an sdk/module_exports
for different os types, e.g. separate ones for android and host.

Adds 'android:"arch_variant"' tag to the dynamically generated fields
for the sdk member types.

Merges the exported members from all variants together.

Determines the device/host_supported flags of the member snapshots by
whether the OsClasses used by their variants rather than the sdk's
host/device supported properties as they may be different.

Bug: 150451422
Test: m nothing
Change-Id: I41fbbcd8723aafd54826aad9b78eced9f66ef51c
This commit is contained in:
Paul Duffin
2020-03-02 18:38:15 +00:00
parent 04c93a40f1
commit 865171ed40
3 changed files with 183 additions and 11 deletions

View File

@@ -150,6 +150,7 @@ func createDynamicSdkMemberTypes(sdkMemberTypes []android.SdkMemberType) *dynami
fields = append(fields, reflect.StructField{
Name: proptools.FieldNameForProperty(p),
Type: reflect.TypeOf([]string{}),
Tag: `android:"arch_variant"`,
})
// Copy the field index for use in the getter func as using the loop variable directly will