fix: Sort the version maps by the most common version

This commit is contained in:
oSumAtrIX
2023-11-27 21:21:25 +01:00
parent 96845ba265
commit e4be6dbccd

View File

@@ -75,5 +75,13 @@ object PatchUtils {
}
}
}
// Sort the version maps by the most common version.
forEach { (packageName, versionMap) ->
this[packageName] = versionMap
.asIterable()
.sortedWith(compareByDescending { it.value })
.associate { it.key to it.value } as VersionMap
}
}
}