diff options
| author | 2021-12-10 22:52:43 +0000 | |
|---|---|---|
| committer | 2021-12-10 23:02:57 +0000 | |
| commit | b3264f20905792e553561e9e0076eaf95d80a25d (patch) | |
| tree | 846b3f37576fb812937251adb2fa4aef258a0583 /apex/androidmk.go | |
| parent | abe2a4b7bfc559255838cbc08a60f84eb5baf046 (diff) | |
Revert "Build license metadata files in Soong"
Revert submission 1899703
Reason for revert: b/210158272
Reverted Changes:
I142c19284:Reuse license metadata files from Soong
Ife89b8f23:Add dependency license annotations
I8e7410837:Build license metadata files in Soong
Change-Id: I48f2bf2e2797ac9d38f7ece35ba616b823035607
Diffstat (limited to 'apex/androidmk.go')
| -rw-r--r-- | apex/androidmk.go | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/apex/androidmk.go b/apex/androidmk.go index f001fa265..7764b6b8d 100644 --- a/apex/androidmk.go +++ b/apex/androidmk.go @@ -309,17 +309,19 @@ func (a *apexBundle) androidMkForFiles(w io.Writer, apexBundleName, apexName, mo return moduleNames } -func (a *apexBundle) writeRequiredModules(w io.Writer) { +func (a *apexBundle) writeRequiredModules(w io.Writer, apexBundleName string) { var required []string var targetRequired []string var hostRequired []string required = append(required, a.RequiredModuleNames()...) targetRequired = append(targetRequired, a.TargetRequiredModuleNames()...) hostRequired = append(hostRequired, a.HostRequiredModuleNames()...) + installMapSet := make(map[string]bool) // set of dependency module:location mappings for _, fi := range a.filesInfo { required = append(required, fi.requiredModuleNames...) targetRequired = append(targetRequired, fi.targetRequiredModuleNames...) hostRequired = append(hostRequired, fi.hostRequiredModuleNames...) + installMapSet[a.fullModuleName(apexBundleName, &fi)+":"+fi.installDir+"/"+fi.builtFile.Base()] = true } if len(required) > 0 { @@ -331,6 +333,11 @@ func (a *apexBundle) writeRequiredModules(w io.Writer) { if len(hostRequired) > 0 { fmt.Fprintln(w, "LOCAL_HOST_REQUIRED_MODULES +=", strings.Join(hostRequired, " ")) } + if len(installMapSet) > 0 { + var installs []string + installs = append(installs, android.SortedStringKeys(installMapSet)...) + fmt.Fprintln(w, "LOCAL_LICENSE_INSTALL_MAP +=", strings.Join(installs, " ")) + } } func (a *apexBundle) androidMkForType() android.AndroidMkData { @@ -352,7 +359,7 @@ func (a *apexBundle) androidMkForType() android.AndroidMkData { if len(moduleNames) > 0 { fmt.Fprintln(w, "LOCAL_REQUIRED_MODULES :=", strings.Join(moduleNames, " ")) } - a.writeRequiredModules(w) + a.writeRequiredModules(w, name) fmt.Fprintln(w, "include $(BUILD_PHONY_PACKAGE)") } else { @@ -394,7 +401,7 @@ func (a *apexBundle) androidMkForType() android.AndroidMkData { if len(a.requiredDeps) > 0 { fmt.Fprintln(w, "LOCAL_REQUIRED_MODULES +=", strings.Join(a.requiredDeps, " ")) } - a.writeRequiredModules(w) + a.writeRequiredModules(w, name) if a.mergedNotices.Merged.Valid() { fmt.Fprintln(w, "LOCAL_NOTICE_FILE :=", a.mergedNotices.Merged.Path().String()) |