From 51227d875b1ae91cde5af5b5b463c93a56c79f94 Mon Sep 17 00:00:00 2001 From: Paul Duffin Date: Tue, 18 May 2021 12:54:27 +0100 Subject: 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 --- android/sdk.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'android/sdk.go') diff --git a/android/sdk.go b/android/sdk.go index 36c576d80..93beb6e21 100644 --- a/android/sdk.go +++ b/android/sdk.go @@ -300,6 +300,22 @@ type BpModule interface { Name() string } +// BpPrintable is a marker interface that must be implemented by any struct that is added as a +// property value. +type BpPrintable interface { + bpPrintable() +} + +// BpPrintableBase must be embedded within any struct that is added as a +// property value. +type BpPrintableBase struct { +} + +func (b BpPrintableBase) bpPrintable() { +} + +var _ BpPrintable = BpPrintableBase{} + // An individual member of the SDK, includes all of the variants that the SDK // requires. type SdkMember interface { -- cgit v1.2.3-59-g8ed1b