mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-16 08:05:34 -04:00
[MC version processor] Bug fix: broken duplicate library filter
This commit is contained in:
parent
0283f151a3
commit
0168ede426
@ -507,24 +507,23 @@ public final class Tools
|
||||
|
||||
List<DependentLibrary> libList = new ArrayList<DependentLibrary>(Arrays.asList(inheritsVer.libraries));
|
||||
try {
|
||||
loop_1:
|
||||
for (DependentLibrary lib : customVer.libraries) {
|
||||
String libName = lib.name.substring(0, lib.name.lastIndexOf(":"));
|
||||
for (int i = 0; i < inheritsVer.libraries.length; i++) {
|
||||
DependentLibrary libAdded = inheritsVer.libraries[i];
|
||||
for (int i = 0; i < libList.size(); i++) {
|
||||
DependentLibrary libAdded = libList.get(i);
|
||||
String libAddedName = libAdded.name.substring(0, libAdded.name.lastIndexOf(":"));
|
||||
|
||||
System.out.println("Equals? " + lib.name + " and " + libAdded.name);
|
||||
if (libAddedName.equals(libName)) {
|
||||
Log.d(APP_NAME, "Library " + libName + ": Replaced version " +
|
||||
libName.substring(libName.lastIndexOf(":") + 1) + " with " +
|
||||
libAddedName.substring(libAddedName.lastIndexOf(":") + 1));
|
||||
libList.set(i, lib);
|
||||
break;
|
||||
} else {
|
||||
libList.add(lib);
|
||||
break;
|
||||
continue loop_1;
|
||||
}
|
||||
}
|
||||
|
||||
libList.add(lib);
|
||||
}
|
||||
} finally {
|
||||
inheritsVer.libraries = libList.toArray(new DependentLibrary[0]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user