[MC Version processor] Debug: replace duplicate libraries

This commit is contained in:
khanhduytran0 2020-12-12 12:28:52 +07:00
parent b32f10c6ec
commit f8fe4b5ca6

View File

@ -260,7 +260,7 @@ public final class Tools
} }
for (String perJar : classpath) { for (String perJar : classpath) {
if (!new File(perJar).exists()) { if (!new File(perJar).exists()) {
System.out.println("ClassPathGen: ignored non-exists file: " + perJar); Log.d(APP_NAME, "Ignored non-exists file: " + perJar);
continue; continue;
} }
libStr.append((isClientFirst ? ":" : "") + perJar + (!isClientFirst ? ":" : "")); libStr.append((isClientFirst ? ":" : "") + perJar + (!isClientFirst ? ":" : ""));
@ -513,6 +513,9 @@ public final class Tools
DependentLibrary libAdded = libList.get(i); DependentLibrary libAdded = libList.get(i);
String libAddedName = libAdded.name.substring(0, libAdded.name.lastIndexOf(":")); String libAddedName = libAdded.name.substring(0, libAdded.name.lastIndexOf(":"));
if (libAddedName.equals(libName)) { 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); libList.set(i, lib);
break; break;
} else { } else {