Merge "Output bootclasspath_fragment's fragments property to sdk snapshot"

This commit is contained in:
Paul Duffin
2021-06-23 17:47:49 +00:00
committed by Gerrit Code Review
5 changed files with 194 additions and 13 deletions

View File

@@ -144,6 +144,8 @@ func gatherApexModulePairDepsWithTag(ctx android.BaseModuleContext, tag blueprin
// ApexVariantReference specifies a particular apex variant of a module.
type ApexVariantReference struct {
android.BpPrintableBase
// The name of the module apex variant, i.e. the apex containing the module variant.
//
// If this is not specified then it defaults to "platform" which will cause a dependency to be

View File

@@ -749,6 +749,9 @@ type bootclasspathFragmentSdkMemberProperties struct {
Stub_libs []string
Core_platform_stub_libs []string
// Fragment properties
Fragments []ApexVariantReference
// Flag files by *hiddenAPIFlagFileCategory
Flag_files_by_category FlagFilesByCategory
@@ -789,6 +792,9 @@ func (b *bootclasspathFragmentSdkMemberProperties) PopulateFromVariant(ctx andro
// Copy stub_libs properties.
b.Stub_libs = module.properties.Api.Stub_libs
b.Core_platform_stub_libs = module.properties.Core_platform_api.Stub_libs
// Copy fragment properties.
b.Fragments = module.properties.Fragments
}
func (b *bootclasspathFragmentSdkMemberProperties) AddToPropertySet(ctx android.SdkMemberContext, propertySet android.BpPropertySet) {
@@ -811,6 +817,9 @@ func (b *bootclasspathFragmentSdkMemberProperties) AddToPropertySet(ctx android.
corePlatformApiPropertySet := propertySet.AddPropertySet("core_platform_api")
corePlatformApiPropertySet.AddPropertyWithTag("stub_libs", b.Core_platform_stub_libs, requiredMemberDependency)
}
if len(b.Fragments) > 0 {
propertySet.AddProperty("fragments", b.Fragments)
}
hiddenAPISet := propertySet.AddPropertySet("hidden_api")
hiddenAPIDir := "hiddenapi"