Fix a gob related issue where anonymous fields need to be exported.

Also add a missing field in packagingSpecGob

Bug: 358427516
Test: Manual verify.
Change-Id: Ib97b4eaf9e342db6a00142fdf045db8e4d9f499c
diff --git a/android/packaging.go b/android/packaging.go
index 3c64d56..d615871 100644
--- a/android/packaging.go
+++ b/android/packaging.go
@@ -65,30 +65,32 @@
 }
 
 type packagingSpecGob struct {
-	RelPathInPackage string
-	SrcPath          Path
-	SymlinkTarget    string
-	Executable       bool
-	Partition        string
-	SkipInstall      bool
-	AconfigPaths     *Paths
-	ArchType         ArchType
-	Overrides        *[]string
-	Owner            string
+	RelPathInPackage      string
+	SrcPath               Path
+	SymlinkTarget         string
+	Executable            bool
+	EffectiveLicenseFiles *Paths
+	Partition             string
+	SkipInstall           bool
+	AconfigPaths          *Paths
+	ArchType              ArchType
+	Overrides             *[]string
+	Owner                 string
 }
 
 func (p *PackagingSpec) ToGob() *packagingSpecGob {
 	return &packagingSpecGob{
-		RelPathInPackage: p.relPathInPackage,
-		SrcPath:          p.srcPath,
-		SymlinkTarget:    p.symlinkTarget,
-		Executable:       p.executable,
-		Partition:        p.partition,
-		SkipInstall:      p.skipInstall,
-		AconfigPaths:     p.aconfigPaths,
-		ArchType:         p.archType,
-		Overrides:        p.overrides,
-		Owner:            p.owner,
+		RelPathInPackage:      p.relPathInPackage,
+		SrcPath:               p.srcPath,
+		SymlinkTarget:         p.symlinkTarget,
+		Executable:            p.executable,
+		EffectiveLicenseFiles: p.effectiveLicenseFiles,
+		Partition:             p.partition,
+		SkipInstall:           p.skipInstall,
+		AconfigPaths:          p.aconfigPaths,
+		ArchType:              p.archType,
+		Overrides:             p.overrides,
+		Owner:                 p.owner,
 	}
 }
 
@@ -97,6 +99,7 @@
 	p.srcPath = data.SrcPath
 	p.symlinkTarget = data.SymlinkTarget
 	p.executable = data.Executable
+	p.effectiveLicenseFiles = data.EffectiveLicenseFiles
 	p.partition = data.Partition
 	p.skipInstall = data.SkipInstall
 	p.aconfigPaths = data.AconfigPaths
diff --git a/android/paths.go b/android/paths.go
index 9c2df65..ec05831 100644
--- a/android/paths.go
+++ b/android/paths.go
@@ -1363,21 +1363,21 @@
 }
 
 type outputPathGob struct {
-	basePath
+	BasePath basePath
 	OutDir   string
 	FullPath string
 }
 
 func (p *OutputPath) ToGob() *outputPathGob {
 	return &outputPathGob{
-		basePath: p.basePath,
+		BasePath: p.basePath,
 		OutDir:   p.outDir,
 		FullPath: p.fullPath,
 	}
 }
 
 func (p *OutputPath) FromGob(data *outputPathGob) {
-	p.basePath = data.basePath
+	p.basePath = data.BasePath
 	p.outDir = data.OutDir
 	p.fullPath = data.FullPath
 }
@@ -1788,7 +1788,7 @@
 }
 
 type installPathGob struct {
-	basePath
+	BasePath     basePath
 	SoongOutDir  string
 	PartitionDir string
 	Partition    string
@@ -1798,7 +1798,7 @@
 
 func (p *InstallPath) ToGob() *installPathGob {
 	return &installPathGob{
-		basePath:     p.basePath,
+		BasePath:     p.basePath,
 		SoongOutDir:  p.soongOutDir,
 		PartitionDir: p.partitionDir,
 		Partition:    p.partition,
@@ -1808,7 +1808,7 @@
 }
 
 func (p *InstallPath) FromGob(data *installPathGob) {
-	p.basePath = data.basePath
+	p.basePath = data.BasePath
 	p.soongOutDir = data.SoongOutDir
 	p.partitionDir = data.PartitionDir
 	p.partition = data.Partition