Revert^2 "Build license metadata files in Soong"
b3264f20905792e553561e9e0076eaf95d80a25d
Change-Id: I5ea5f7e29eb1dbc72b8b30f010006a25f5f72fac
diff --git a/android/module.go b/android/module.go
index 767f9f4..df01dc5 100644
--- a/android/module.go
+++ b/android/module.go
@@ -1230,6 +1230,10 @@
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.
@@ -1774,6 +1778,12 @@
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
@@ -2049,6 +2059,8 @@
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