Revert "Don't add flattened files apex as dependencies of an image apex"

This reverts commit eb8cd3122a.

Reason for revert: mainline module jacoco jar do not contain JAVA_LIBRARIES needed for coverage, see: b/266679012

Change-Id: If756f7aaf40c6bcfed170c59c494bcc426620039
This commit is contained in:
Diwas Sharma
2023-01-26 18:42:21 +00:00
parent eb8cd3122a
commit bb9202e688
2 changed files with 29 additions and 17 deletions

View File

@@ -317,14 +317,14 @@ func (a *apexBundle) writeRequiredModules(w io.Writer, moduleNames []string) {
func (a *apexBundle) androidMkForType() android.AndroidMkData {
return android.AndroidMkData{
Custom: func(w io.Writer, name, prefix, moduleDir string, data android.AndroidMkData) {
moduleNames := []string{}
apexType := a.properties.ApexType
if a.installable() {
apexName := proptools.StringDefault(a.properties.Apex_name, name)
moduleNames = a.androidMkForFiles(w, name, apexName, moduleDir, data)
}
if apexType == flattenedApex {
var moduleNames []string = nil
if a.installable() {
apexName := proptools.StringDefault(a.properties.Apex_name, name)
moduleNames = a.androidMkForFiles(w, name, apexName, moduleDir, data)
}
// Only image APEXes can be flattened.
fmt.Fprintln(w, "\ninclude $(CLEAR_VARS) # apex.apexBundle.flat")
fmt.Fprintln(w, "LOCAL_PATH :=", moduleDir)
@@ -366,7 +366,7 @@ func (a *apexBundle) androidMkForType() android.AndroidMkData {
}
android.AndroidMkEmitAssignList(w, "LOCAL_OVERRIDES_MODULES", a.overridableProperties.Overrides)
a.writeRequiredModules(w, nil)
a.writeRequiredModules(w, moduleNames)
fmt.Fprintln(w, "include $(BUILD_PREBUILT)")