Added library deduplication in IneritFrom.
This commit is contained in:
parent
a7cf5b0ec8
commit
6d66c0fe9d
@ -180,7 +180,19 @@ func (m *Manifest) InheritFrom(parent *Manifest) error {
|
||||
m.JavaVersion.MajorVersion = parent.JavaVersion.MajorVersion
|
||||
}
|
||||
|
||||
m.Libraries = append(m.Libraries, parent.Libraries...)
|
||||
merge_libs:
|
||||
for _, plib := range parent.Libraries {
|
||||
plname := strings.Split(plib.Name, ":")
|
||||
for _, lib := range m.Libraries {
|
||||
lname := strings.Split(lib.Name, ":")
|
||||
if len(plname) == len(lname) {
|
||||
if lname[0]+":"+lname[1] == plname[0]+":"+plname[1] {
|
||||
continue merge_libs
|
||||
}
|
||||
}
|
||||
}
|
||||
m.Libraries = append(m.Libraries, plib)
|
||||
}
|
||||
|
||||
if m.Logging.Client.Argument == "" {
|
||||
m.Logging.Client.Argument = parent.Logging.Client.Argument
|
||||
|
Loading…
Reference in New Issue
Block a user