Remove installFilesDepSet, packagingSpecsDepSet and licenseInstallMap
from ModuleBase.
The old packagingSpecsDepSet field is kept temporarily to bypass an
auto-merge issue, and will be removed in next change.
Bug: 358425833
Test: CI
Change-Id: I28b4933459c33224f756cc306cabc8088f9be862
diff --git a/android/module_context.go b/android/module_context.go
index e9fbb8c..632fc96 100644
--- a/android/module_context.go
+++ b/android/module_context.go
@@ -107,65 +107,65 @@
// InstallExecutable creates a rule to copy srcPath to name in the installPath directory,
// with the given additional dependencies. The file is marked executable after copying.
//
- // The installed file will be returned by FilesToInstall(), and the PackagingSpec for the
- // installed file will be returned by PackagingSpecs() on this module or by
- // TransitivePackagingSpecs() on modules that depend on this module through dependency tags
- // for which IsInstallDepNeeded returns true.
+ // The installed file can be accessed by InstallFilesInfo.InstallFiles, and the PackagingSpec
+ // for the installed file can be accessed by InstallFilesInfo.PackagingSpecs on this module
+ // or by InstallFilesInfo.TransitivePackagingSpecs on modules that depend on this module through
+ // dependency tags for which IsInstallDepNeeded returns true.
InstallExecutable(installPath InstallPath, name string, srcPath Path, deps ...InstallPath) InstallPath
// InstallFile creates a rule to copy srcPath to name in the installPath directory,
// with the given additional dependencies.
//
- // The installed file will be returned by FilesToInstall(), and the PackagingSpec for the
- // installed file will be returned by PackagingSpecs() on this module or by
- // TransitivePackagingSpecs() on modules that depend on this module through dependency tags
- // for which IsInstallDepNeeded returns true.
+ // The installed file can be accessed by InstallFilesInfo.InstallFiles, and the PackagingSpec
+ // for the installed file can be accessed by InstallFilesInfo.PackagingSpecs on this module
+ // or by InstallFilesInfo.TransitivePackagingSpecs on modules that depend on this module through
+ // dependency tags for which IsInstallDepNeeded returns true.
InstallFile(installPath InstallPath, name string, srcPath Path, deps ...InstallPath) InstallPath
// InstallFileWithExtraFilesZip creates a rule to copy srcPath to name in the installPath
// directory, and also unzip a zip file containing extra files to install into the same
// directory.
//
- // The installed file will be returned by FilesToInstall(), and the PackagingSpec for the
- // installed file will be returned by PackagingSpecs() on this module or by
- // TransitivePackagingSpecs() on modules that depend on this module through dependency tags
- // for which IsInstallDepNeeded returns true.
+ // The installed file can be accessed by InstallFilesInfo.InstallFiles, and the PackagingSpec
+ // for the installed file can be accessed by InstallFilesInfo.PackagingSpecs on this module
+ // or by InstallFilesInfo.TransitivePackagingSpecs on modules that depend on this module through
+ // dependency tags for which IsInstallDepNeeded returns true.
InstallFileWithExtraFilesZip(installPath InstallPath, name string, srcPath Path, extraZip Path, deps ...InstallPath) InstallPath
// InstallSymlink creates a rule to create a symlink from src srcPath to name in the installPath
// directory.
//
- // The installed symlink will be returned by FilesToInstall(), and the PackagingSpec for the
- // installed file will be returned by PackagingSpecs() on this module or by
- // TransitivePackagingSpecs() on modules that depend on this module through dependency tags
- // for which IsInstallDepNeeded returns true.
+ // The installed symlink can be accessed by InstallFilesInfo.InstallFiles, and the PackagingSpec
+ // for the installed file can be accessed by InstallFilesInfo.PackagingSpecs on this module
+ // or by InstallFilesInfo.TransitivePackagingSpecs on modules that depend on this module through
+ // dependency tags for which IsInstallDepNeeded returns true.
InstallSymlink(installPath InstallPath, name string, srcPath InstallPath) InstallPath
// InstallAbsoluteSymlink creates a rule to create an absolute symlink from src srcPath to name
// in the installPath directory.
//
- // The installed symlink will be returned by FilesToInstall(), and the PackagingSpec for the
- // installed file will be returned by PackagingSpecs() on this module or by
- // TransitivePackagingSpecs() on modules that depend on this module through dependency tags
- // for which IsInstallDepNeeded returns true.
+ // The installed symlink can be accessed by InstallFilesInfo.InstallFiles, and the PackagingSpec
+ // for the installed file can be accessed by InstallFilesInfo.PackagingSpecs on this module
+ // or by InstallFilesInfo.TransitivePackagingSpecs on modules that depend on this module through
+ // dependency tags for which IsInstallDepNeeded returns true.
InstallAbsoluteSymlink(installPath InstallPath, name string, absPath string) InstallPath
// InstallTestData creates rules to install test data (e.g. data files used during a test) into
// the installPath directory.
//
- // The installed files will be returned by FilesToInstall(), and the PackagingSpec for the
- // installed files will be returned by PackagingSpecs() on this module or by
- // TransitivePackagingSpecs() on modules that depend on this module through dependency tags
- // for which IsInstallDepNeeded returns true.
+ // The installed files can be accessed by InstallFilesInfo.InstallFiles, and the PackagingSpec
+ // for the installed files can be accessed by InstallFilesInfo.PackagingSpecs on this module
+ // or by InstallFilesInfo.TransitivePackagingSpecs on modules that depend on this module through
+ // dependency tags for which IsInstallDepNeeded returns true.
InstallTestData(installPath InstallPath, data []DataPath) InstallPaths
// PackageFile creates a PackagingSpec as if InstallFile was called, but without creating
// the rule to copy the file. This is useful to define how a module would be packaged
// without installing it into the global installation directories.
//
- // The created PackagingSpec for the will be returned by PackagingSpecs() on this module or by
- // TransitivePackagingSpecs() on modules that depend on this module through dependency tags
- // for which IsInstallDepNeeded returns true.
+ // The created PackagingSpec can be accessed by InstallFilesInfo.PackagingSpecs on this module
+ // or by InstallFilesInfo.TransitivePackagingSpecs on modules that depend on this module through
+ // dependency tags for which IsInstallDepNeeded returns true.
PackageFile(installPath InstallPath, name string, srcPath Path) PackagingSpec
CheckbuildFile(srcPath Path)
@@ -218,6 +218,10 @@
GetOutputFiles() OutputFilesInfo
+ // SetLicenseInstallMap stores the set of dependency module:location mappings for files in an
+ // apex container for use when generation the license metadata file.
+ SetLicenseInstallMap(installMap []string)
+
// ComplianceMetadataInfo returns a ComplianceMetadataInfo instance for different module types to dump metadata,
// which usually happens in GenerateAndroidBuildActions() of a module type.
// See android.ModuleBase.complianceMetadataInfo
@@ -236,6 +240,12 @@
// the OutputFilesProvider in GenerateBuildActions
outputFiles OutputFilesInfo
+ TransitiveInstallFiles *DepSet[InstallPath]
+
+ // set of dependency module:location mappings used to populate the license metadata for
+ // apex containers.
+ licenseInstallMap []string
+
katiInstalls katiInstalls
katiSymlinks katiInstalls
@@ -521,7 +531,7 @@
}
if m.requiresFullInstall() {
- deps = append(deps, InstallPaths(m.module.base().installFilesDepSet.ToList())...)
+ deps = append(deps, InstallPaths(m.TransitiveInstallFiles.ToList())...)
deps = append(deps, m.module.base().installedInitRcPaths...)
deps = append(deps, m.module.base().installedVintfFragmentsPaths...)
@@ -738,6 +748,10 @@
return m.outputFiles
}
+func (m *moduleContext) SetLicenseInstallMap(installMap []string) {
+ m.licenseInstallMap = append(m.licenseInstallMap, installMap...)
+}
+
func (m *moduleContext) ComplianceMetadataInfo() *ComplianceMetadataInfo {
if complianceMetadataInfo := m.module.base().complianceMetadataInfo; complianceMetadataInfo != nil {
return complianceMetadataInfo