Revert^2 "Build license metadata files in Soong" am: 4acaea9cbf

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1918948

Change-Id: I8682f46f7843e0d367b96a09135dad03e3df934c
This commit is contained in:
Colin Cross
2021-12-11 03:48:25 +00:00
committed by Automerger Merge Worker
7 changed files with 286 additions and 23 deletions

View File

@@ -1227,6 +1227,10 @@ type ModuleBase struct {
initRcPaths Paths
vintfFragmentsPaths Paths
// set of dependency module:location mappings used to populate the license metadata for
// apex containers.
licenseInstallMap []string
}
// A struct containing all relevant information about a Bazel target converted via bp2build.
@@ -1773,6 +1777,12 @@ func (m *ModuleBase) VintfFragments() Paths {
return append(Paths{}, m.vintfFragmentsPaths...)
}
// SetLicenseInstallMap stores the set of dependency module:location mappings for files in an
// apex container for use when generation the license metadata file.
func (m *ModuleBase) SetLicenseInstallMap(installMap []string) {
m.licenseInstallMap = append(m.licenseInstallMap, installMap...)
}
func (m *ModuleBase) generateModuleTarget(ctx ModuleContext) {
var allInstalledFiles InstallPaths
var allCheckbuildFiles Paths
@@ -2038,6 +2048,8 @@ func (m *ModuleBase) GenerateBuildActions(blueprintCtx blueprint.ModuleContext)
m.installFilesDepSet = newInstallPathsDepSet(m.installFiles, dependencyInstallFiles)
m.packagingSpecsDepSet = newPackagingSpecsDepSet(m.packagingSpecs, dependencyPackagingSpecs)
buildLicenseMetadata(ctx)
m.buildParams = ctx.buildParams
m.ruleParams = ctx.ruleParams
m.variables = ctx.variables