summaryrefslogtreecommitdiff
path: root/java/bootclasspath_fragment.go
diff options
context:
space:
mode:
author Paul Duffin <paulduffin@google.com> 2021-05-18 12:54:27 +0100
committer Paul Duffin <paulduffin@google.com> 2021-06-23 17:12:31 +0100
commit51227d875b1ae91cde5af5b5b463c93a56c79f94 (patch)
tree64bb8ed584435f78e01819b8295a6b253351fcea /java/bootclasspath_fragment.go
parent2afa8915bb32e43c1f59240d44740e2dcbfb8235 (diff)
Output bootclasspath_fragment's fragments property to sdk snapshot
Adds support for printing a PropertySet that has a property whose value is an array of structs. Bug: 179354495 Test: m nothing m conscrypt-module-sdk - check generated Android.bp file Change-Id: I71be04188465610bcbea4d3c9a5e8204171a1eeb
Diffstat (limited to 'java/bootclasspath_fragment.go')
-rw-r--r--java/bootclasspath_fragment.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/java/bootclasspath_fragment.go b/java/bootclasspath_fragment.go
index c9d5917fa..c7249b0ca 100644
--- a/java/bootclasspath_fragment.go
+++ b/java/bootclasspath_fragment.go
@@ -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"