Merge branch 'no-crunch-aapt-option' of https://github.com/Novex/Apktool

This commit is contained in:
Connor Tumbleson
2018-12-18 16:24:27 -05:00
3 changed files with 18 additions and 0 deletions

View File

@ -28,6 +28,7 @@ public class ApkOptions {
public boolean isFramework = false;
public boolean resourcesAreCompressed = false;
public boolean useAapt2 = false;
public boolean noCrunch = false;
public Collection<String> doNotCompress;
public String frameworkFolderLocation = null;

View File

@ -350,6 +350,10 @@ final public class AndrolibResources {
cmd.add("-v");
}
if (apkOptions.noCrunch) {
cmd.add("--no-crunch");
}
try {
OS.exec(cmd.toArray(new String[0]));
LOGGER.fine("aapt2 compile command ran: ");
@ -485,6 +489,9 @@ final public class AndrolibResources {
if (apkOptions.debugMode) { // inject debuggable="true" into manifest
cmd.add("--debug-mode");
}
if (apkOptions.noCrunch) {
cmd.add("--no-crunch");
}
// force package id so that some frameworks build with correct id
// disable if user adds own aapt (can't know if they have this feature)
if (mPackageId != null && ! customAapt && ! mSharedLibrary) {