aapt2: treat verbose output as fine

This commit is contained in:
Connor Tumbleson 2018-02-28 10:58:38 -05:00
parent 367d33e314
commit 3c84590a1a

View File

@ -327,7 +327,8 @@ final public class AndrolibResources {
cmd.add("--dir"); cmd.add("--dir");
cmd.add(resDir.getAbsolutePath()); cmd.add(resDir.getAbsolutePath());
cmd.add("--legacy"); // Treats error that used to be valid in aapt1 as warnings in aapt2 // Treats error that used to be valid in aapt1 as warnings in aapt2
cmd.add("--legacy");
try { try {
tempResourcesZip = File.createTempFile("BRUT", ".zip"); tempResourcesZip = File.createTempFile("BRUT", ".zip");
@ -342,10 +343,8 @@ final public class AndrolibResources {
try { try {
OS.exec(cmd.toArray(new String[0])); OS.exec(cmd.toArray(new String[0]));
if (apkOptions.verbose) { LOGGER.fine("aapt2 compile command ran: ");
LOGGER.info("aapt2 compile command ran: "); LOGGER.fine(cmd.toString());
LOGGER.info(cmd.toString());
}
} catch (BrutException ex) { } catch (BrutException ex) {
throw new AndrolibException(ex); throw new AndrolibException(ex);
} }
@ -456,10 +455,8 @@ final public class AndrolibResources {
try { try {
OS.exec(cmd.toArray(new String[0])); OS.exec(cmd.toArray(new String[0]));
if (apkOptions.verbose) { LOGGER.fine("aapt2 link command ran: ");
LOGGER.info("aapt2 link command ran: "); LOGGER.fine(cmd.toString());
LOGGER.info(cmd.toString());
}
} catch (BrutException ex) { } catch (BrutException ex) {
throw new AndrolibException(ex); throw new AndrolibException(ex);
} }
@ -563,10 +560,8 @@ final public class AndrolibResources {
} }
try { try {
OS.exec(cmd.toArray(new String[0])); OS.exec(cmd.toArray(new String[0]));
if (apkOptions.verbose) { LOGGER.fine("command ran: ");
LOGGER.info("command ran: "); LOGGER.fine(cmd.toString());
LOGGER.info(cmd.toString());
}
} catch (BrutException ex) { } catch (BrutException ex) {
throw new AndrolibException(ex); throw new AndrolibException(ex);
} }
@ -587,9 +582,7 @@ final public class AndrolibResources {
cmd.add(aaptFile.getPath()); cmd.add(aaptFile.getPath());
customAapt = true; customAapt = true;
if (apkOptions.verbose) { LOGGER.fine(aaptFile.getPath() + " being used as aapt location.");
LOGGER.info(aaptFile.getPath() + " being used as aapt location.");
}
} else { } else {
LOGGER.warning("aapt location could not be found. Defaulting back to default"); LOGGER.warning("aapt location could not be found. Defaulting back to default");