Loading apex/apex.go +85 −75 Original line number Diff line number Diff line Loading @@ -954,20 +954,16 @@ func (a *apexBundle) AndroidMk() android.AndroidMkData { }} } func (a *apexBundle) androidMkForType(apexType apexPackaging) android.AndroidMkData { return android.AndroidMkData{ Custom: func(w io.Writer, name, prefix, moduleDir string, data android.AndroidMkData) { func (a *apexBundle) androidMkForFiles(w io.Writer, name, moduleDir string) []string { moduleNames := []string{} for _, fi := range a.filesInfo { if !android.InList(fi.moduleName, moduleNames) { moduleNames = append(moduleNames, fi.moduleName) } } for _, fi := range a.filesInfo { if cc, ok := fi.module.(*cc.Module); ok && cc.Properties.HideFromMake { continue } if !android.InList(fi.moduleName, moduleNames) { moduleNames = append(moduleNames, fi.moduleName) } fmt.Fprintln(w, "\ninclude $(CLEAR_VARS)") fmt.Fprintln(w, "LOCAL_PATH :=", moduleDir) fmt.Fprintln(w, "LOCAL_MODULE :=", fi.moduleName) Loading @@ -982,7 +978,6 @@ func (a *apexBundle) androidMkForType(apexType apexPackaging) android.AndroidMkD } fmt.Fprintln(w, "LOCAL_PREBUILT_MODULE_FILE :=", fi.builtFile.String()) fmt.Fprintln(w, "LOCAL_MODULE_CLASS :=", fi.class.NameInMake()) fmt.Fprintln(w, "LOCAL_UNINSTALLABLE_MODULE :=", !a.installable()) if fi.module != nil { archStr := fi.module.Target().Arch.ArchType.String() host := false Loading Loading @@ -1033,12 +1028,25 @@ func (a *apexBundle) androidMkForType(apexType apexPackaging) android.AndroidMkD fmt.Fprintln(w, "include $(BUILD_PREBUILT)") } } return moduleNames } func (a *apexBundle) androidMkForType(apexType apexPackaging) android.AndroidMkData { return android.AndroidMkData{ Custom: func(w io.Writer, name, prefix, moduleDir string, data android.AndroidMkData) { moduleNames := []string{} if a.installable() { a.androidMkForFiles(w, name, moduleDir) } if a.flattened && apexType.image() { // Only image APEXes can be flattened. fmt.Fprintln(w, "\ninclude $(CLEAR_VARS)") fmt.Fprintln(w, "LOCAL_PATH :=", moduleDir) fmt.Fprintln(w, "LOCAL_MODULE :=", name) if len(moduleNames) > 0 { fmt.Fprintln(w, "LOCAL_REQUIRED_MODULES :=", strings.Join(moduleNames, " ")) } fmt.Fprintln(w, "include $(BUILD_PHONY_PACKAGE)") } else { // zip-apex is the less common type so have the name refer to the image-apex Loading @@ -1055,7 +1063,9 @@ func (a *apexBundle) androidMkForType(apexType apexPackaging) android.AndroidMkD fmt.Fprintln(w, "LOCAL_MODULE_STEM :=", name+apexType.suffix()) fmt.Fprintln(w, "LOCAL_UNINSTALLABLE_MODULE :=", !a.installable()) fmt.Fprintln(w, "LOCAL_REQUIRED_MODULES :=", String(a.properties.Key)) if len(moduleNames) > 0 { fmt.Fprintln(w, "LOCAL_REQUIRED_MODULES +=", strings.Join(moduleNames, " ")) } fmt.Fprintln(w, "include $(BUILD_PREBUILT)") if apexType == imageApex { Loading Loading
apex/apex.go +85 −75 Original line number Diff line number Diff line Loading @@ -954,20 +954,16 @@ func (a *apexBundle) AndroidMk() android.AndroidMkData { }} } func (a *apexBundle) androidMkForType(apexType apexPackaging) android.AndroidMkData { return android.AndroidMkData{ Custom: func(w io.Writer, name, prefix, moduleDir string, data android.AndroidMkData) { func (a *apexBundle) androidMkForFiles(w io.Writer, name, moduleDir string) []string { moduleNames := []string{} for _, fi := range a.filesInfo { if !android.InList(fi.moduleName, moduleNames) { moduleNames = append(moduleNames, fi.moduleName) } } for _, fi := range a.filesInfo { if cc, ok := fi.module.(*cc.Module); ok && cc.Properties.HideFromMake { continue } if !android.InList(fi.moduleName, moduleNames) { moduleNames = append(moduleNames, fi.moduleName) } fmt.Fprintln(w, "\ninclude $(CLEAR_VARS)") fmt.Fprintln(w, "LOCAL_PATH :=", moduleDir) fmt.Fprintln(w, "LOCAL_MODULE :=", fi.moduleName) Loading @@ -982,7 +978,6 @@ func (a *apexBundle) androidMkForType(apexType apexPackaging) android.AndroidMkD } fmt.Fprintln(w, "LOCAL_PREBUILT_MODULE_FILE :=", fi.builtFile.String()) fmt.Fprintln(w, "LOCAL_MODULE_CLASS :=", fi.class.NameInMake()) fmt.Fprintln(w, "LOCAL_UNINSTALLABLE_MODULE :=", !a.installable()) if fi.module != nil { archStr := fi.module.Target().Arch.ArchType.String() host := false Loading Loading @@ -1033,12 +1028,25 @@ func (a *apexBundle) androidMkForType(apexType apexPackaging) android.AndroidMkD fmt.Fprintln(w, "include $(BUILD_PREBUILT)") } } return moduleNames } func (a *apexBundle) androidMkForType(apexType apexPackaging) android.AndroidMkData { return android.AndroidMkData{ Custom: func(w io.Writer, name, prefix, moduleDir string, data android.AndroidMkData) { moduleNames := []string{} if a.installable() { a.androidMkForFiles(w, name, moduleDir) } if a.flattened && apexType.image() { // Only image APEXes can be flattened. fmt.Fprintln(w, "\ninclude $(CLEAR_VARS)") fmt.Fprintln(w, "LOCAL_PATH :=", moduleDir) fmt.Fprintln(w, "LOCAL_MODULE :=", name) if len(moduleNames) > 0 { fmt.Fprintln(w, "LOCAL_REQUIRED_MODULES :=", strings.Join(moduleNames, " ")) } fmt.Fprintln(w, "include $(BUILD_PHONY_PACKAGE)") } else { // zip-apex is the less common type so have the name refer to the image-apex Loading @@ -1055,7 +1063,9 @@ func (a *apexBundle) androidMkForType(apexType apexPackaging) android.AndroidMkD fmt.Fprintln(w, "LOCAL_MODULE_STEM :=", name+apexType.suffix()) fmt.Fprintln(w, "LOCAL_UNINSTALLABLE_MODULE :=", !a.installable()) fmt.Fprintln(w, "LOCAL_REQUIRED_MODULES :=", String(a.properties.Key)) if len(moduleNames) > 0 { fmt.Fprintln(w, "LOCAL_REQUIRED_MODULES +=", strings.Join(moduleNames, " ")) } fmt.Fprintln(w, "include $(BUILD_PREBUILT)") if apexType == imageApex { Loading