diff options
Diffstat (limited to 'android/licenses.go')
-rw-r--r-- | android/licenses.go | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/android/licenses.go b/android/licenses.go index 55f46ae23..387792144 100644 --- a/android/licenses.go +++ b/android/licenses.go @@ -22,6 +22,7 @@ import ( "sync" "github.com/google/blueprint" + "github.com/google/blueprint/gobtools" ) // Adds cross-cutting licenses dependency to propagate license metadata through the build system. @@ -67,6 +68,31 @@ type applicableLicensesPropertyImpl struct { licensesProperty *[]string } +type applicableLicensesPropertyImplGob struct { + Name string + LicensesProperty []string +} + +func (a *applicableLicensesPropertyImpl) ToGob() *applicableLicensesPropertyImplGob { + return &applicableLicensesPropertyImplGob{ + Name: a.name, + LicensesProperty: *a.licensesProperty, + } +} + +func (a *applicableLicensesPropertyImpl) FromGob(data *applicableLicensesPropertyImplGob) { + a.name = data.Name + a.licensesProperty = &data.LicensesProperty +} + +func (a applicableLicensesPropertyImpl) GobEncode() ([]byte, error) { + return gobtools.CustomGobEncode[applicableLicensesPropertyImplGob](&a) +} + +func (a *applicableLicensesPropertyImpl) GobDecode(data []byte) error { + return gobtools.CustomGobDecode[applicableLicensesPropertyImplGob](data, a) +} + func newApplicableLicensesProperty(name string, licensesProperty *[]string) applicableLicensesProperty { return applicableLicensesPropertyImpl{ name: name, |